#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  P p[6];
  while(~scanf("%lf,%lf,",&p[1].real(),&p[1].imag())){
    REP(i,3) scanf("%lf,%lf,",&p[i+2].real(),&p[i+2].imag());
    p[5] = p[1];
    p[0] = p[4];
    bool ans = true;
    REP(i,4){
      P v1 = p[i+1] - p[i];
      P v2 = p[i+2] - p[i+1];
      v1 /= abs(v1); v2 /= abs(v2);
      P tmp = v2 / v1;
      if(tmp.imag() < 0) ans = false;
    }
    puts(ans?"YES":"NO");
  }
  return 0;
}