#include<iostream>
using namespace std;
int main(void){
  double x1,x2,x3,x4,y1,y2,y3,y4;
  char d;

  while(cin>>x1>>d>>y1>>d>>x2>>d>>y2>>d>>x3>>d>>y3>>d>>x4>>d>>y4!='\0'){

    int a=0,b=0;
    int han=0;

    if(y2>(x2-x1)*(y3-y1)/(x3-x1)+y1)
      a=1;
    if(y4>(x4-x1)*(y3-y1)/(x3-x1)+y1)
      b=1;
    if(a==b)
      han=1;

    a=b=0;

    if(y1>(x1-x2)*(y4-y2)/(x4-x2)+y2)
      a=1;
    if(y3>(x3-x2)*(y4-y2)/(x4-x2)+y2)
      b=1;
    if(a==b)
      han=1;

    if(han==0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;

  }

}