class Convex
  def initialize
    results = []

    while input = $stdin.gets do
      @xa,@ya,@xb,@yb,@xc,@yc,@xd,@yd = input.chomp.split(',').map(&:to_f)
      if check
        results << "YES"
      else
        results << "NO"
      end
    end

    results.each do |str|
      puts str
    end
  end

  def check
    flag1 = false
    flag2 = false
    a = (@xb-@xd)/(@yb-@yd)
    b = @yb - a*@xb

    if a*@xa + b < @ya
      flag1 = true
    end

    if a*@xc + b < @yc
      flag2 = true
    end

    flag1^flag2
  end
end

c = Convex.new