 
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;

 const int maxn = 100000;
 struct Point
 {
    double x,y;
    Point() {}
    Point(double _x, double _y) {
        x = _x;
        y = _y;
    }

    Point operator -(const Point &B) const {
        return Point(x-B.x, y-B.y);
    }

 }p[maxn];

 double eps = 1e-10;
 
 int dcmp(double x)
 {
    if(fabs(x) < eps) return 0;
    else return x < 0 ? -1 : 1;
 }
 
 double Cross(Point A, Point B)
 {
    return A.x*B.y - A.y*B.x;
 }
 
 bool isConvex(Point *p, int n)
 {
    p[n] = p[0]; 
    p[n+1] = p[1]; 
    int now = dcmp(Cross(p[1]-p[0], p[2]-p[1]));
    for(int i = 1; i < n; i++)
    {
        int next = dcmp(Cross(p[i+1]-p[i], p[i+2]-p[i+1]));
        if(now*next < 0)
        {
            return false;
        }
        now = next; 
    }
    return true;
 }
 
 int main()
 {
    int n=4;
    char temp,temp2;
    while(cin>>p[0].x>>temp>>p[0].y>>temp2)
    {
        for(int i = 1; i < 3; i++)
        {
            char temp3,temp4;     
            cin>>p[i].x>>temp3>>p[i].y>>temp4;
        }
        char temp5;
        cin>>p[3].x>>temp5>>p[3].y;
        bool flag = isConvex(p,n);
        if(flag) printf("YES\n");
        else printf("NO\n");
    }
    //while(1);
    return 0;
 }

 