#include <bits/stdc++.h>
int main() {
  double a, A, b, B, c, C, d, D, e;
  for (; ~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a, &A, &b, &B, &c, &C, &d,
                &D);
       a -= b, b -= c, c -= d, d -= e,
       e = A, A -= B, B -= C, C -= D, D -= e,
       puts(a * B - A * b > 0 && b * C - B * c > 0 && c * D - C * d > 0 &&
                    d * A - D * a > 0
                ? "YES"
                : "NO"))
    e = a;
}
