#!/usr/local/bin/ruby
def heron(a,b,c)
t = Math::sqrt((a+b+c)*(-a+b+c)*(a-b+c)*(a+b-c)/16)
t
end

a = Array.new
while(line = gets) != "0\n"
 a << line.split(",").map(&:to_f)
end
a.each do |xa,ya,xb,yb,xc,yc,xd,yd|
 ab = Math::sqrt( (xb-xa)**2 + (yb-ya)**2 )
 ac = Math::sqrt( (xc-xa)**2 + (yc-ya)**2 )
 ad = Math::sqrt( (xd-xa)**2 + (yd-ya)**2 )
 bc = Math::sqrt( (xc-xb)**2 + (yc-yb)**2 )
 bd = Math::sqrt( (xd-xb)**2 + (yd-yb)**2 )
 cd = Math::sqrt( (xd-xc)**2 + (yd-yc)**2 )
 if ((heron(ab,ac,bc)+heron(ac,cd,ad)) == (heron(ab,bd,ad)+heron(bc,cd,bd)))
  puts "YES"
 else
  puts "NO"
 end
end