#include <bits/stdc++.h>
using namespace std;
struct point {
  double x;
  double y;
};
int main() {
  point ten[4];
  while (cin >> ten[0].x) {
    scanf(",%lf", &ten[0].y);
    for (int i = 0; i < 3; i++) {
      scanf(",%lf,%lf", &ten[i + 1].x, &ten[i + 1].y);
    }
    double gaiseki[4];
    for (int i = 0; i < 4; i++) {
      point vec1, vec2;
      vec1.x = ten[(i + 1) % 4].x - ten[i].x;
      vec1.y = ten[(i + 1) % 4].y - ten[i].y;
      vec2.x = ten[(i + 2) % 4].x - ten[(i + 1) % 4].x;
      vec2.y = ten[(i + 2) % 4].y - ten[(i + 1) % 4].y;
      gaiseki[i] = vec1.x * vec2.y - vec1.y * vec2.x;
    }
    bool neg = false;
    for (int i = 0; i < 4; i++) {
      if (gaiseki[i] < 0) neg = true;
    }
    if (neg)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
