using System;
using System.Collections.Generic;

namespace test
{
    class Program
    {
        struct Vector
        {
            public decimal x;
            public decimal y;

            public Vector(decimal x, decimal y)
            {
                this.x = x;
                this.y = y;
            }
        }

        static void Main(string[] args)
        {
            List<bool> resultList = new List<bool>();

            string input;
            while((input = Console.ReadLine()) != null)
            {
                string[] inputArray = Console.ReadLine().Split(',');

                decimal xa = decimal.Parse(inputArray[0]);
                decimal ya = decimal.Parse(inputArray[1]);
                decimal xb = decimal.Parse(inputArray[2]);
                decimal yb = decimal.Parse(inputArray[3]);
                decimal xc = decimal.Parse(inputArray[4]);
                decimal yc = decimal.Parse(inputArray[5]);
                decimal xd = decimal.Parse(inputArray[6]);
                decimal yd = decimal.Parse(inputArray[7]);

                Vector A = new Vector(xa,ya);
                Vector B = new Vector(xb,yb);
                Vector C = new Vector(xc,yc);
                Vector D = new Vector(xd, yd);

                Vector AB = CompositVector(A, B);
                Vector AC = CompositVector(A, C);
                Vector AD = CompositVector(A, D);

                resultList.Add(IsConvex(AB, AC, AD));

            }

            foreach (bool a in resultList)
            {
                if (a)
                {
                    Console.WriteLine("YES");
                }
                else
                {
                    Console.WriteLine("NO");
                }
            }

            Console.ReadKey();

        }

        static Vector CompositVector(Vector A, Vector B)
        {
            Vector AB = new Vector();

            AB.x = B.x - A.x;
            AB.y = B.y - A.y;

            return AB;
        }

        static bool IsConvex(Vector AB, Vector AC, Vector AD)
        {
            decimal s = (AD.y * AC.x - AD.x * AC.y) / (AB.x * AD.y - AB.y * AD.x);
            decimal t = (AB.x * AC.y - AB.y * AC.x) / (AB.x * AD.y - AB.y * AD.x);

            if (s >= 0 && t >= 0 && s + t > 1)
            {
                return true;
            }
            else
            {
                return false;
            }

        }

    }
}