class Point
  attr_reader :x, :y

  def initialize(x, y)
    @x=x
    @y=y
  end
end

# 1次関数(2点標準形)
def linear(p1, p2)
  lambda { |p| (p2.y-p1.y)*(p.x-p1.x)-(p2.x-p1.x)*(p.y-p1.y) }
end

# 分類判定(凸四角形)
def convex?(poly)

  a=linear(poly[0], poly[2]).call(poly[1])
  b=linear(poly[0], poly[2]).call(poly[3])
  c=linear(poly[1], poly[3]).call(poly[0])
  d=linear(poly[1], poly[3]).call(poly[2])

  return (a*b<0&&c*d<0)

end


while (line=gets.chomp)!=nil

  ps = line.split(/,/).map(&:to_f)
  p1=Point.new(ps[0], ps[1])
  p2=Point.new(ps[2], ps[3])
  p3=Point.new(ps[4], ps[5])
  p4=Point.new(ps[6], ps[7])

  if convex?([p1, p2, p3, p4])
    puts :YES
  else
    puts :NO
  end

end