class Point
  attr_accessor :x, :y
  def initialize(x, y) @x = x; @y = y; end 
end

def c(p1, p2, p) (p2.y - p1.y) * (p.x - p1.x) - (p2.x - p1.x)* (p.y - p1.y)  end 

while s = gets
  p = s.split(',').map(&:to_f)
  a, b, c, d = 4.times.map { Point.new(p.shift, p.shift) }
  puts c(a, c, b) * c(a, c, d) < 0 && c(b, d, a) * c(b, d, c) < 0 ? 'YES' : 'NO'
end