#include<iostream>
#include<complex>
#include<cstdio>
using namespace std;
bool crossfl(complex<double> v, complex<double> a, complex<double> b);
double outv(complex<double> a, complex<double> b);
int main(){
  complex<double> a,b,c,d;
  for(;;){
    if(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&(a.real()),&(a.imag()),&(b.real()),&(b.imag()),&(c.real()),&(c.imag()),&(d.real()),&(d.imag())) == EOF) break;
    if((crossfl(c-a,b-a,d-a)) && crossfl(d-b,a-b,c-b)) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
}
bool crossfl(complex<double> v, complex<double> a, complex<double> b){
  return ((outv(v,a)*outv(v,b))<0);
}
double outv(complex<double> a, complex<double> b){
  return a.real()*b.imag()-a.imag()*b.real();
}