#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*vy+ux*uy;//????????????u??¨????????????v?????????

    return product/v/u;

}

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

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

    if(arg(xb-xa,yb-ya,xd-xa,yd-ya)<0)//cosA<0
      cout<<"NO"<<endl;

    else if(arg(xc-xb,yc-yb,xa-xb,ya-yb)<0)//cosB<0
      cout<<"NO"<<endl;

    else if(arg(xd-xc,yd-yc,xb-xc,yb-yc)<0)//cosC<0
      cout<<"NO"<<endl;

    else if(arg(xc-xd,yc-yd,xa-xd,ya-yd)<0)//cosD<0
      cout<<"NO"<<endl;

    else
      cout<<"YES"<<endl;

  }
}