class Vector
  attr_accessor :x, :y
  
  def initialize(x = 0, y = 0)
    @x = x
    @y = y
  end

  def cross(v)
    return (@x * v.y - @y * v.x)
  end

  def -(v)
    return Vector.new(@x - v.x, @y - v.y)
  end
end

if __FILE__ == $0
  while line = gets
    xa, ya, xb, yb, xc, yc, xd, yd = line.split(',').map{|i| i.to_f}
    a = Vector.new(xa, ya)
    b = Vector.new(xb, yb)
    c = Vector.new(xc, yc)
    d = Vector.new(xd, yd)

    ab = a - b
    bc = b - c
    cd = c - d
    da = d - a

    if ab.cross(bc) >= 0 &&  bc.cross(cd) >= 0 && cd.cross(da) >= 0 && da.cross(ab) >= 0
      puts "YES"
    else
      puts "NO"
    end
  end
end