#include <bits/stdc++.h>
using namespace std;
typedef struct point {
  double x, y;
} point;
point vect(point a, point b) {
  point l;
  l.x = a.x - b.x;
  l.y = a.y - b.y;
  return l;
}
double cos(point a, point b, point c) {
  point p1, p2;
  double inner;
  p1 = vect(a, c);
  p2 = vect(b, c);
  inner = p1.x * p2.x + p1.y * p2.y;
  return inner;
}
int main() {
  char a;
  double l[4];
  while (1) {
    bool ans = true;
    point p[4];
    for (int i = 0; i < 4; i++)
      if (scanf("%lf,%lf,", &p[i].x, &p[i].y) == EOF) return 0;
    if (cos(p[3], p[1], p[0]) < 0) ans = false;
    if (cos(p[0], p[2], p[1]) < 0) ans = false;
    if (cos(p[3], p[1], p[2]) < 0) ans = false;
    if (cos(p[2], p[0], p[3]) < 0) ans = false;
    if (ans == true) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
