#include <bits/stdc++.h>
int main() {
  double a1, a2, b1, b2, xa, ya, xb, yb, xc, yc, xd, yd;
  int count;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    count = 0;
    if (xa == xc)
      a1 = 0;
    else
      a1 = (ya - yc) / (xa - xc);
    b1 = ya - a1 * xa;
    if (xb == xd)
      a2 = 0;
    else
      a2 = (yb - yd) / (xb - xd);
    b2 = yb - a2 * xb;
    if (((yb > a1 * xb + b1) && (yd < a1 * xd + b1)) ||
        ((yb < a1 * xb + b1) && (yd > a1 * xd + b1)))
      count++;
    if (((ya > a2 * xa + b2) && (yc < a2 * xc + b2)) ||
        ((ya > a2 * xa + b2) && (yc < a2 * xc + b2)))
      count++;
    if (count == 2)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
