#include <bits/stdc++.h>
struct point {
  double x, y;
};
struct point v(struct point a, struct point b) {
  struct point res;
  res.x = b.x - a.x, res.y = b.y - a.y;
  return res;
}
int main(int argc, char *argv[]) {
  struct point a, b, c, d;
  int i;
  while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.x, &a.y, &b.x, &b.y, &c.x,
                &c.y, &d.x, &d.y)) {
    if ((v(a, b).x * v(b, c).y - v(b, c).x * v(a, b).y) *
            (v(b, c).x * v(c, d).y - v(c, d).x * v(b, c).y) *
            (v(c, d).x * v(d, a).y - v(d, a).x * v(c, d).y) >
        0)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
