require 'scanf'

while line = gets
  s = line.split(',').map(&:to_f)
  q = s.each_slice(2)
  b = q.each_with_index.min_by{|v| v[0][1]}[1]
  a = []
  q = q.map{|v| v}
  n = q.size
  for i in 0..3
    x = q[(i+1)%n][0]-q[i][0]
    y = q[(i+1)%n][1]-q[i][1]
    t = Math.atan2(y,x)
    a.push(t<0 ? t+2*Math::PI : t)
  end
  c = a[b] <= a[(b+1)%n]
  for i in 0..2
    if (a[(b+i)%n] <= a[(b+i+1)%n]) != c
      puts "NO"
      break
    end
    puts "YES" if i == 2
  end
end