#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point operator-(const Point a) {
    x -= a.x;
    y -= a.y;
    return *this;
  }
};
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
Point v[4];
int main() {
  while (1) {
    if (scanf("%lf,%lf,", &v[0].x, &v[0].y) == EOF) break;
    for (int i = (1); i < (4); i++) {
      scanf("%lf,%lf,", &v[i].x, &v[i].y);
    }
    bool flg = true;
    for (int i = (0); i < (4); i++) {
      if (cross(v[(i + 1) % 4] - v[i], v[(i + 2) % 4] - v[i]) < 0) flg = false;
    }
    if (flg) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
