#include <bits/stdc++.h>
int hantei(double, double, double, double, double, double);
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double xac, yac, xbd, ybd;
  double xab, yab, xad, yad, xcb, ycb;
  int f;
  while (1) {
    if (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &yb, &xc, &yc, &xd,
              &yd) == EOF)
      break;
    xac = xa - xc;
    yac = ya - yc;
    xbd = xb - xd;
    ybd = yb - yd;
    xab = xa - xb;
    yab = ya - yb;
    xad = xa - xd;
    yad = ya - yd;
    xcb = xc - xb;
    ycb = yc - yb;
    f = 0;
    if (hantei(xab, yab, xad, yad, xac, yac) == 1) f = 1;
    if (hantei(xab, yab, xcb, ycb, xbd, ybd) == 1) f = 1;
    if (f == 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
int hantei(double a, double b, double c, double d, double e, double f) {
  double t1, t2;
  t1 = a * f - b * e;
  t2 = c * f - d * e;
  if ((t1 * t2) < 0)
    return 0;
  else
    return 1;
}
