#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<cmath>
#include<map>
#include<cstring>
using namespace std;
#define F first
#define S second
typedef pair<double,double> P;
P A[4];
bool check(int pre,int now,int nex){//前、今、次
  if(pre==0) return true;
  double a = atan2((A[pre].S-A[now].S),(A[pre].F-A[now].F));
  double b = atan2((A[nex].S-A[now].S),(A[nex].F-A[now].F));
  if(max(a,b)-min(a,b)>=M_PI/2.0 && max(a,b)-min(a,b)<=(M_PI/2.0)*3) return true;
  return false;
}

int main(){
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
	      &A[0].F,&A[0].S,
	      &A[1].F,&A[1].S,
	      &A[2].F,&A[2].S,
	      &A[3].F,&A[3].S)!=EOF){
    
    bool f=true;
    for(int i=0;i<4;i++){
      int pre = (i+3)%4;
      int now = i;
      int next = (i+1)%4;
      if(!check(pre,now,next)) f=false;
    }
    if(f) puts("YES");
    else puts("NO");
  }
}