#include <bits/stdc++.h>
struct point {
  double a, b;
};
struct point v(struct point a, struct point b) {
  struct point x;
  x.a = b.a - a.a, x.b = b.b - a.b;
  return x;
}
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.a, &a.b, &b.a, &b.b, &c.a,
                &c.b, &d.a, &d.b)) {
    if ((v(a, b).a * v(b, c).b - v(b, c).a * v(a, b).b) *
                (v(b, c).a * v(c, d).b - v(c, d).a * v(b, c).b) <
            0 ||
        (v(b, c).a * v(c, d).b - v(c, d).a * v(b, c).b) *
                (v(c, d).a * v(d, a).b - v(d, a).a * v(c, d).b) <
            0)
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
