#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <stack>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define For(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}

typedef pair<double, double> xy;

const double ERR = 1e-8;
double rnddouble(double d) {
    long l = 1 / ERR * 10;
    return (double)round(d * l) / l / 10;
}

double area(xy A, xy B, xy C) {
    double ab = sqrt((A.first-B.first)*(A.first-B.first) + (A.second-B.second)*(A.second-B.second));
    double ac = sqrt((A.first-C.first)*(A.first-C.first) + (A.second-C.second)*(A.second-C.second));
    double bc = sqrt((B.first-C.first)*(B.first-C.first) + (B.second-C.second)*(B.second-C.second));
    double b = rnddouble(ab*ab+ac*ac-bc*bc)/2/ab/ac;
    double theta = acos(b);
    double a = 0.5 * ab * ac * sin(theta);
    return a;
}

bool insideTriangle(xy A, xy B, xy C, xy P) {
    if (abs(area(A,B,P) + area(B,C,P) + area(C,A,P) - area(A,B,C)) < ERR) return true;
    return false;
}

xy middle(xy A, xy B) {
    return make_pair((A.first+B.first)/2, (A.second+B.second)/2);
}

int main() {
    float x1,y1,x2,y2,x3,y3,x4,y4;
    while(scanf("%f,%f,%f,%f,%f,%f,%f,%f", &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF) {
        xy A, B, C, D;
        A = make_pair(x1, y1);
        B = make_pair(x2, y2);
        C = make_pair(x3, y3);
        D = make_pair(x4, y4);
        if ((insideTriangle(A, B, D, middle(A,C)) || insideTriangle(C, B, D, middle(A,C)))
            && (insideTriangle(A, B, D, middle(B,D)) || insideTriangle(C, B, D, middle(B,D)))) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}