#include <iostream>
#include <complex>

using namespace std;

typedef complex<double> P;

#define EPS (1.0e-11)
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )

double cross(P a, P b) {
    return (a.real() * b.imag() - a.imag() * b.real());
}


int main()
{
    double x[4], y[4];
    char comma;

    while (cin >> x[0] >> comma >> y[0]) {
        bool clock;

        for (int i = 1; i < 4; i++) 
            cin >> comma >> x[i] >> comma >> y[i];

        if (cross(P(x[1] - x[0], y[1] - y[0]), 
                  P(x[2] - x[0], y[2] - y[0])) > EPS)
            clock = true;
        else
            clock = false;

        bool flag = true;
        for (int i = 1; i < 4; i++) {
            if (clock) {
                if (cross(P(x[(i + 1) % 4] - x[i], y[(i + 1) % 4] - y[i]), 
                          P(x[(i + 2) % 4] - x[i], y[(i + 2) % 4] - y[i])) < -EPS) {
                    flag = false;
                    break;
                }
            }
            else {
                if (cross(P(x[(i + 1) % 4] - x[i], y[(i + 1) % 4] - y[i]), 
                          P(x[(i + 2) % 4] - x[i], y[(i + 2) % 4] - y[i])) > EPS) {
                    flag = false;
                    break;
                }
            }
        }
        if (flag)
            cout << "YES" << endl;
        else 
            cout << "NO" << endl;
    }
    
    return 0;
}