#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double a[2],b[2],c[2],d[2];
  for(;;){
    bool f = false;
    if(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a[0],&a[1],&b[0],&b[1],&c[0],&c[1],&d[0],&d[1]) == EOF) break;
    if(((a[0]-c[0])*(b[0]-c[0])-(a[1]-c[1])*(b[1]-c[1]))*((a[0]-c[0])*(d[0]-c[0])-(a[1]-c[1])*(d[1]-c[1]))>0) f = true;
    if(((b[0]-d[0])*(a[0]-d[0])-(b[1]-d[1])*(a[1]-d[1]))*((b[0]-d[0])*(c[0]-d[0])-(b[1]-d[1])*(c[1]-d[1]))>0) f = true;
    if(f) cout <<"NO"<<endl;
    else cout <<"YES"<<endl;
  }
  return 0;
}