#include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

typedef complex<double> P;

const double eps = 1e-8;

double heron(P p1, P p2, P p3) {
    double x = abs(p2 - p1), y = abs(p3 - p2), z = abs(p1 - p3);
    double s = (x + y + z) / 2.0;
    return sqrt(s * (s - x) * (s - y) * (s - z));
}

int main() {
    P p[4];
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
          &p[0].real(), &p[0].imag(), &p[1].real(), &p[1].imag(),
                &p[2].real(), &p[2].imag(), &p[3].real(), &p[3].imag()) != EOF) {
        if (abs(heron(p[0], p[1], p[2]) + heron(p[0], p[2], p[3])
                - heron(p[1], p[2], p[3]) - heron(p[1], p[3], p[0])) < eps) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}