#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <complex>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define P complex<double>

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

vector<P> g(4);
double cross(P a,P b){
  return a.real() * b.imag() - a.imag() * b.real();
}
int main(void){
  double x[4],y[4];
  char d;
  while(cin>> g[0].real() >> d >> g[0].imag(),!cin.eof()){
    loop(i,1,4){
      cin>>d>>g[i].real() >> d >> g[i].imag();
    }
    string res = "NO";
    rep(k,2){
      rep(i,4){
    P a = g[(i+1)%4] - g[i];
    P b = g[(i+2)%4] - g[i];
    if(cross(a, b) < 0.0) break;
    if(i+1 == 4) res = "YES";
      }
      reverse(g.begin(), g.end());
    }
    cout<<res<<endl;
  }
}