#include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 1000000000
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;


double dist(double x1,double y1,double x2,double y2){

    return sqrt( (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1) );

}

double deg(double a,double b,double c){

    return acos( (a*a + b*b - c*c ) / (2 * a * b ) );

}

double calc_deg(double x1,double y1,double x2,double y2,double x3,double y3){

    double x,y,z;

    x = dist(x1,y1,x2,y2);
    y = dist(x2,y2,x3,y3);
    z = dist(x3,y3,x1,y1); 

    return deg(x,y,z);

}


int main(){

    double x1,y1,x2,y2,x3,y3,x4,y4;
    char c;

    while(cin >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> x3 >> c >> y3 >> c >> x4 >> c >> y4){

        double deg1,deg2,deg3,deg4;

        deg1 = calc_deg(x1,y1,x2,y2,x3,y3);
        deg2 = calc_deg(x2,y2,x3,y3,x4,y4);
        deg3 = calc_deg(x3,y3,x4,y4,x1,y1);
        deg4 = calc_deg(x4,y4,x1,y1,x2,y2);


        if(abs(deg1 + deg2 + deg3 + deg4 - 2*M_PI) < 0.00001){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }


    }
    return 0;

}
