using System;
using System.Collections.Generic;
using System.Linq;

namespace AOJ
{
  class Program
  {
    public static void Main(string[] args)
    {
      const int NumberOfVertex = 4;
      foreach (var points in Read())
      {
        var result = true;
        foreach (var i in Enumerable.Range(0, NumberOfVertex))
        {
          var next = (i + 1) % NumberOfVertex;
          var prev = (i - 1) % NumberOfVertex;
          if (prev < 0)
            prev += NumberOfVertex;
          var x = points[prev] - points[i];
          var y = points[next] - points[i];
          var c = x.CrossProduct(y);
          if (c < 0)
          {
            result = false;
            break;
          }
        }
        if (result)
          Console.WriteLine("YES");
        else
          Console.WriteLine("NO");
      }
    }

    public static IEnumerable<Vector[]> Read()
    {
      string line;
      while (!string.IsNullOrEmpty(line = Console.ReadLine()))
        yield return line.Split(',').Select(s => double.Parse(s))
                                    .Slice(2)
                                    .Select(pair => new Vector(pair[0], pair[1]))
                                    .ToArray();
    }
  }

  static class EnumerableEx
  {
    public static IEnumerable<T[]> Slice<T>(this IEnumerable<T> source, int count)
    {
      return Slice<T, T[]>(source, count, x => x.ToArray());
    }

    public static IEnumerable<TResult> Slice<TSource, TResult>(this IEnumerable<TSource> source, int count, Func<IEnumerable<TSource>, TResult> selector)
    {
      var result = new List<TSource>(count);
      foreach (var v in source)
      {
        result.Add(v);
        if (result.Count == count)
        {
          yield return selector(result);
          result.Clear();
        }
      }
      if (result.Any())
        yield return selector(result);
    }
  }

  class Vector
  {
    double norm;

    public double X { get; private set; }
    public double Y { get; private set; }
    public double Norm
    {
      get { return norm; }
    }

    public Vector(double x, double y)
    {
      X = x;
      Y = y;
      norm = Math.Sqrt(X * X + Y * Y);
    }

    public double CrossProduct(Vector other)
    {
      return Vector.CrossProduct(this, other);
    }

    public static double CrossProduct(Vector a, Vector b)
    {
      return a.X * b.X + a.Y * b.Y;
    }

    public static Vector operator-(Vector a, Vector b)
    {
      return new Vector(a.X - b.X, a.Y - b.Y);
    }

    public override string ToString()
    {
      return "Point(" + X + ", " + Y + ")";
    }
  }
}