#include <iostream>
#include <string>
#include <sstream>
#include <complex>
using namespace std;
 
class Solver {
private:
    complex<double> z[4];
public:
    bool input() {
        string str;
        if(!getline(cin, str)) return false;
        for(unsigned int i=0; i<str.size(); i++) {
            if(str[i] == ',') str[i] = ' ';
        }
        stringstream ss(str);
        double x, y;
        for(int i=0; i<4; i++) {
            if(!(ss >> x >> y)) return false;
            z[i].real(x);
            z[i].imag(y);
        }
        return true;
    }
    bool isConvex() {
        return (cross(z[1]-z[0], z[2]-z[1]) > 0
                && cross(z[2]-z[1], z[3]-z[2]) > 0
                && cross(z[3]-z[2], z[0]-z[3]) > 0
                && cross(z[0]-z[3], z[1]-z[0]) > 0)
                || (cross(z[1]-z[0], z[2]-z[1]) < 0
                && cross(z[2]-z[1], z[3]-z[2]) < 0
                && cross(z[3]-z[2], z[0]-z[3]) < 0
                && cross(z[0]-z[3], z[1]-z[0]) < 0);
    }
    double cross(complex<double> z1, complex<double> z2) {
        return z1.real()*z2.imag() - z1.imag()*z2.real();
    }
};
 
int main(int argc, char** argv) {
    Solver solver;
    while(solver.input()) {
        if(solver.isConvex()) {
            cout << "YES" << endl;
        }else {
            cout << "NO" << endl;
        }
    }
    return 0;
}