#include <bits/stdc++.h>
double o(double* a, double* b, double* c) {
  return a[1] * (*c - *b) + c[1] * (*b - *a) + b[1] * (*a - *c);
}
double x, p[8];
int i;
int main(void) {
  for (; ~scanf("%lf,", p + i++ % 8);)
    i % 8 || (x = o(p, p + 2, p + 4),
              puts(x * o(p + 2, p + 4, p + 6) > 0 && x * o(p + 4, p + 6, p) > 0
                       ? "YES"
                       : "NO"));
  return 0;
}
