$<.readlines.map {|l| l.split(",").map(&:to_r)}.each do |given|
  f = (given + given.first(4)).each_slice(2).each_cons(3).map do |a, b, c|
    (c[0] - a[0]) * (b[1] - a[1]) - (c[1] - a[1]) * (b[0] - a[0]) > 0
  end
  puts((f.all? or f.none?) ? "YES" : "NO")
end
