#include <bits/stdc++.h>
void swap(double *a, double *b) {
  int hoge;
  hoge = *a;
  *a = *b;
  *b = hoge;
}
int main(void) {
  int i;
  double x[4], y[4], a, b, c, d, ansx, ansy, _x[4], _y[4], hoge;
  while (1) {
    if (scanf("%lf", &x[0]) == EOF) {
      break;
    }
    scanf(",%lf,%lf,%lf,%lf,%lf,%lf,%lf", &y[0], &x[1], &y[1], &x[2], &y[2],
          &x[3], &y[3]);
    if ((x[0] - x[2]) == 0 || (y[0] - y[2]) == 0)
      a = 0;
    else
      a = (y[0] - y[2]) / (x[0] - x[2]);
    if ((x[1] - x[3]) == 0 || (y[1] - y[3]) == 0)
      c = 0;
    else
      c = (y[1] - y[3]) / (x[1] - x[3]);
    b = y[0] - a * x[0];
    d = y[1] - c * x[1];
    ansx = (b - d) / (c - a);
    if ((c - a) == 0) {
      printf("YES\n");
      continue;
    }
    if (x[0] > x[2]) swap(&x[0], &x[2]);
    if (x[1] > x[3]) swap(&x[1], &x[3]);
    if (x[0] < ansx && ansx < x[2] && x[1] < ansx && ansx < x[3])
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
