#include <bits/stdc++.h>
int main(void) {
  double x[4], y[4], s, t, u;
  int i, l, f;
  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]) != EOF) {
    f = 0;
    while (1) {
      s = (y[0] - y[2]) / (x[0] - x[2]);
      t = y[0] - x[0] * s;
      u = (y[1] - (x[1] * s + t)) * (y[3] - (x[3] * s + t));
      if (u >= 0) {
        f = 1;
        break;
      }
      s = (y[1] - y[3]) / (x[1] - x[3]);
      t = y[1] - x[1] * s;
      u = (y[0] - (x[0] * s + t)) * (y[2] - (x[2] * s + t));
      if (u >= 0) {
        f = 1;
        break;
      }
      break;
    }
    if (f == 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
