#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
//---------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double INF = 1e12;
#define PI 2*acos(0.0)
typedef complex<double> P;
namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } }
namespace std { bool operator == (const P& a, const P& b) { return abs(real(a) - real(b)) < EPS && abs(imag(a) - imag(b)) < EPS; } }
double cross(const P& a, const P& b) { return imag(conj(a)*b); }
double dot(const P& a, const P& b) { return real(conj(a)*b); }
struct L : public vector<P> { L() {} L(const P &a, const P &b) { push_back(a); push_back(b); } };
typedef vector<P> G;
struct C { P p; double r; C() {} C(const P &p, double r) : p(p), r(r) {} };
int ccw(P a, P b, P c) {
	b -= a; c -= a;
	if (cross(b, c) > 0)   return +1;       // counter clockwise
	if (cross(b, c) < 0)   return -1;       // clockwise
	if (dot(b, c) < 0)     return +2;       // c--a--b on line
	if (norm(b) < norm(c)) return -2;       // a--b--c on line
	return 0;
}
/*---------------------------------------------------------------------------------------------------
????????????????????????????????? ??§?????§  
??????????????? ??§?????§ ???????´<_??? ?????? Welcome to My Coding Space!
???????????? ??? ?´_???`??????/??? ???i     
?????????????????????????????? ???  |???|     
????????? /?????? /??£??£??£??£/??????|  
??? ???_(__??????/???    ???/ .| .|????????????  
??? ????????????/????????????/??????u??????  
---------------------------------------------------------------------------------------------------*/






//---------------------------------------------------------------------------------------------------
void _main() {
    double a, b, c, d, e, f, g, h;
    while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a, &b, &c, &d, &e, &f, &g, &h)) {
        vector<P> v;
        v.push_back(P(a, b));
        v.push_back(P(c, d));
        v.push_back(P(e, f));
        v.push_back(P(g, h));

        set<int> s;
        rep(i, 0, 4) {
            int j = (i + 1) % 4;
            int k = (i + 2) % 4;

            s.insert(ccw(v[i], v[j], v[k]));
        }

        if (s.size() == 1) printf("YES\n");
        else printf("NO\n");
    }
}