#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main(void){
  double x[4], y[4];
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", x, y, x+1, y+1, x+2, y+2, x+3, y+3) != EOF){
    bool convex = false;
    for(int i = 0; i < 3; i++){
      double x1, y1, x2, y2;
      x1 = x[i+1] - x[i]; y1 = y[i+1] - y[i];
      x2 = x[(i+2)%4] - x[i+1]; y2 = y[(i+2)%4] - x[i+1];
      double a, b;
      a = sqrt(x1 * x1 + y1 * y1);
      b = sqrt(x2 * x2 + y2 * y2);
      double sin = (x1 * y2 - x2 * y1) / (a * b);
      if(sin < 0) { convex = true; break; }
    }
    if(convex) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}