#include <bits/stdc++.h>
double tri_area(double x1, double y1, double x2, double y2, double x3,
                double y3) {
  double a, b, c, z, sum;
  a = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  b = sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2));
  c = sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3));
  z = (a + b + c) / 2;
  sum = sqrt(z * (z - a) * (z - b) * (z - c));
  return sum;
}
int main(void) {
  int i, num;
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double a, b, c, z, s1, s2, s3, s4;
  int decision[1000];
  char hoge;
  for (i = 0; scanf("%lf%c%lf%c%lf%c%lf%c%lf%c%lf%c%lf%c%lf", &xa, &hoge, &ya,
                    &hoge, &xb, &hoge, &yb, &hoge, &xc, &hoge, &yc, &hoge, &xd,
                    &hoge, &yd) == 15;
       i++) {
    s1 = tri_area(xa, ya, xb, yb, xc, yc);
    s2 = tri_area(xd, yd, xb, yb, xc, yc);
    s3 = tri_area(xd, yd, xa, ya, xc, yc);
    s4 = tri_area(xd, yd, xa, ya, xb, yb);
    if (s1 >= s2 + s3 + s4 || s2 >= s3 + s4 + s1 || s3 >= s4 + s1 + s2 ||
        s4 >= s1 + s2 + s3) {
      decision[i] = 0;
    } else {
      decision[i] = 1;
    }
  }
  num = i;
  for (i = 0; i < num; i++) {
    if (decision[i] == 0) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
