#include <bits/stdc++.h>
using namespace std;
double smen(double x1, double y1, double x2, double y2, double x3, double y3) {
  return abs((x3 - x2) * (y1 - y2) - (x1 - x2) * (y3 - y2)) * 0.5;
}
int main(void) {
  int x[4], y[4];
  char c;
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f", &x[0], &y[0], &x[1], &y[1], &x[2],
               &y[2], &x[3], &y[3])) {
    double s1 = smen(x[0], y[0], x[1], y[1], x[2], y[2]) +
                smen(x[2], y[2], x[3], y[3], x[0], y[0]);
    double s2 = smen(x[0], y[0], x[1], y[1], x[3], y[3]) +
                smen(x[2], y[2], x[1], y[1], x[3], y[3]);
    cout << ((s1 == s2) ? "YES" : "NO") << endl;
  }
  return 0;
}
