#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++) {
      gaiseki[i] =
          (ten[(i + 5) % 4].x - ten[i].x) * (ten[(i + 3) % 4].y - ten[i].y) +
          (ten[(i + 5) % 4].y - ten[i].y) * (ten[(i + 3) % 4].x - ten[i].x);
    }
    bool check1 = (gaiseki[0] > 0) && (gaiseki[1] < 0) && (gaiseki[2] > 0) &&
                  (gaiseki[3] < 0);
    bool check2 = (gaiseki[0] < 0) && (gaiseki[1] > 0) && (gaiseki[2] < 0) &&
                  (gaiseki[3] > 0);
    if (check1 || check2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
