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
    if (@xd-@xb) != 0
      a = (@yd-@yb)/(@xd-@xb)
    else
      a = @xb
    end

    b = @yb - a*@xb

    if a == 0
      if b < @xa
        flag1 = true
      end

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

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

    flag1^flag2
  end
end

c = Convex.new