
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

//???????????????????????????????§?(cos??)????±???????
double arg(double vx,double vy,double ux,double uy)
{
  double v=sqrt(vx*vx+vy*vy);//????????????v?????§??????
  double u=sqrt(ux*ux+uy*uy);//????????????u?????§??????
  double product=vx*ux+vy*uy;//????????????u??¨????????????v?????????
  /*
  printf("\nv=%f\nu=%f\n",u,v);
  printf("product=%f\n",product);
  printf("cos=%f\n",product/v/u);
  */
  return acos(product/v/u);

}


int main()
{
  double xa,ya,xb,yb,xc,yc,xd,yd;
  double large,small;

  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
	      &xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){


    large=arg(xa-xd,ya-yd,xc-xd,yc-yd);//DC,DA
    small=arg(xb-xd,yb-yd,xc-xd,yc-yd);//DC,DB
    // printf("A\n%f\n%f\n",large,small);
    if(large<small){      //?§?A?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xb-xa,yb-ya,xd-xa,yd-ya);//AD,AB
    small=arg(xc-xa,yc-ya,xd-xa,yd-ya);//AD,AC
    // printf("B\n%f\n%f\n",large,small);
    if(large<small){      //?§?B?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xc-xb,yc-yb,xa-xb,ya-yb);//BA,BC
    small=arg(xd-xb,yd-yb,xa-xb,ya-yb);//BA,BD
    // printf("C\n%f\n%f\n",large,small);
    if(large<small){      //?§?C?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xd-xc,yd-yc,xb-xc,yb-yc);//CB,CD
    small=arg(xa-xc,ya-yc,xb-xc,yb-yc);//CB,CA
    //  printf("D\n%f\n%f\n",large,small);
    if(large<small){      //?§?D?????????  
      cout<<"NO"<<endl;
      continue;
    }

    cout<<"YES"<<endl;

  }
}