#include<iostream>
using namespace std;
double xa,ya,xb,yb,xc,yc,xd,yd;
int a,cnt,cnt2;
char ch;
int f(double x1,double y1,double x2,double y2){
  double a =x1*x2+y2*y1;//= x1*y2 - x2*y1;
  //cout<<a<<endl;
  if(a>0.0)return 1;
  if(a<0.0)return -1;
  return 0;
}
int main(){
  while(cin>>xa>>ch>>ya>>ch>>xb>>ch>>yb>>ch>>xc>>ch>>yc>>ch>>xd>>ch>>yd){
    a=f(xa-xb,ya-yb,xb-xc,yb-yc);
    if(a>0)cnt++;
    else if(a==0)cnt++,cnt2++;
    else cnt2++;

    a=f(xb-xc,yb-yc,xc-xd,yc-yd);
    if(a>0)cnt++;
    else if(a==0)cnt++,cnt2++;
    else cnt2++;

    a=f(xc-xd,yc-yd,xd-xa,yd-ya);
    if(a>0)cnt++;
    else if(a==0)cnt++,cnt2++;
    else cnt2++;

    a=f(xd-xa,yd-ya,xa-xb,ya-yb);
    if(a>0)cnt++;
    else if(a==0)cnt++,cnt2++;
    else cnt2++;

    if(cnt==4||cnt2==4)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}