#include <bits/stdc++.h>
int main() {
  double x[4], y[4], a, b;
  int i, j;
  while ((scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1],
                &x[2], &y[2], &x[3], &y[3])) != -1) {
    a = (y[2] - y[0]) / (x[2] - x[0]);
    b = (y[2] - x[2] * a);
    if (!((a * x[1] + b < y[1]) == (a * x[3] + b > y[3]))) {
      printf("NO\n");
      continue;
    }
    a = (y[3] - y[1]) / (x[3] - x[1]);
    b = (y[3] - x[3] * a);
    if (!((a * x[0] + b < y[0]) == (a * x[2] + b > y[2]))) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
  }
  return 0;
}
