#include <iostream>
#include <algorithm>
#include <complex>
#include <cstdio>
#define EPS 1e-10
#define EQ(a,b) (abs(a - b) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()))
using namespace std;

typedef complex<double> P;

double angle (double c, double b, double a) {
    return (acos((b*b + c*c - a*a) / (2*b*c)) * 180.0 / M_PI);
}

int main ()
{
    double ax, ay, bx, by, cx, cy, dx, dy;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ax, &ay, &bx, &by, &cx, &cy, &dx, &dy) != EOF) {
        P a = P(ax, by);
        P b = P(bx, by);
        P c = P(cx, cy);
        P d = P(dx, dy);

        double angles = 0.0;
        angles += angle(abs(a - d), abs(a - b), abs(d - b));
        angles += angle(abs(b - a), abs(b - c), abs(a - c));
        angles += angle(abs(c - b), abs(c - d), abs(d - b));
        angles += angle(abs(d - a), abs(d - c), abs(a - c));

        if (EQ(angles, 360.0)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return 0;
}