#include <iostream>

using namespace std;

struct Vector {
        double x;
        double y;
};

bool is_c_inner(double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd) {
    Vector ab = Vector{xb - xa, yb - ya};
    Vector bc = Vector{xc - xb, yc - yb};

    Vector bd = Vector{xd - xb, yd - yb};
    Vector dc = Vector{xc - xd, yc - yd};

    Vector da = Vector{xa - xd, ya - yd};
    Vector ac = Vector{xc - xa, yc - ya};

    double cross_product_1 = ab.x * bc.y - ab.y * bc.x;
    double cross_product_2 = bd.x * dc.y - bd.y * dc.x;
    double cross_product_3 = da.x * ac.y - da.y * ac.x;

    return (cross_product_1 >  0 && cross_product_2 >  0 && cross_product_3 >  0) ||
            (cross_product_1 <  0 || cross_product_2 <  0 && cross_product_3 <  0);
}

int main() {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    string result;

    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) != EOF) {
        if(is_c_inner( xa, ya, xb, yb, xc, yc, xd, yd)
                || is_c_inner(xb, yb, xc, yc, xd, yd, xa, ya)
                || is_c_inner(xc, yc, xd, yd, xa, ya, xb, yb)
                || is_c_inner( xd, yd, xa, ya, xb, yb, xc, yc)
                ) {
            result = "NO"; // convex
        } else {
            result = "YES"; //no convex
        }
        cout << result << endl;
    }
    return 0;
}