#include <bits/stdc++.h>
using namespace std;
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  P operator-(P p) { return P(x - p.x, y - p.y); }
  double det(P p) { return x * p.y - y * p.x; }
};
int main() {
  P a[4];
  char e;
  while (cin >> a[0].x >> e >> a[0].y) {
    int flag = 1;
    for (int i = 1; i < 4; i++) {
      cin >> e >> a[i].x >> e >> a[i].y;
    }
    for (int i = 0; i < 4; i++) {
      if ((a[(i + 1) % 4] - a[i]).det(a[(i + 2) % 4] - a[(i + 1) % 4]) <
          -1e-12) {
        cout << "NO" << endl;
        flag = 0;
        break;
      }
    }
    if (flag) cout << "YES" << endl;
  }
}
