#include <bits/stdc++.h>
int main(void) {
  double x[4], y[4];
  int i;
  double sen, kata;
  double sen2, kata2;
  while (scanf("%lf,", &x[0]) != EOF) {
    scanf("%lf,", &y[0]);
    for (i = 1; i < 4; i++) {
      scanf("%lf,", &x[i]);
      scanf("%lf,", &y[i]);
    }
    kata = (y[2] - y[0]) / (x[2] - x[0]);
    sen = y[0] + (x[3] - x[0]) * (y[2] - y[0]) / (x[2] - x[0]);
    kata2 = (y[2] - y[1]) / (x[2] - x[1]);
    sen2 = y[1] + (x[3] - x[1]) * (y[2] - y[1]) / (x[2] - x[1]);
    if (kata > 0 && kata2 > 0) {
      if (sen < y[3] && sen2 < y[3]) printf("YES\n");
    } else if (kata < 0 && kata2 < 0) {
      if (sen > y[3] && sen2 > y[3]) printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
