class Vector
  attr_accessor :x, :y

  def initialize(x, y)
    self.x = x
    self.y = y
  end

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

  def length()
    return (self.x**2 + self.y**2)**0.5
  end

  def product(v)
    return self.x*v.x + self.y*v.y
  end

  def degree(v)
    return Math.acos(self.product(v) / (self.length * v.length)) * 180 / Math::PI
  end
end

$<.each_line do |line|
  xa, ya, xb, yb, xc, yc, xd, yd = line.split(",").map(&:to_f)

  v1 = Vector.new(xa-xb, ya-yb)
  v2 = Vector.new(xb-xc, yb-yc)
  v3 = Vector.new(xc-xd, yc-yd)
  v4 = Vector.new(xd-xa, yd-ya)

  d1 = v1.degree(v2)
  d2 = v2.degree(v3.reversed)
  d3 = v3.degree(v4.reversed)
  d4 = v4.degree(v1.reversed)

  has_convex = [d1, d2, d3, d4].any?{|d| d > 90}
  puts has_convex ? "NO" : "YES"
end