#include <bits/stdc++.h>
int main() {
  float xa, ya, xb, yb, xc, yc, xd, yd;
  int flag;
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f", &xa, &ya, &xb, &yb, &xc, &yc, &xd,
               &yd) != EOF) {
    if ((xb - xa) * (yd - ya) - (xd - xa) * (yb - ya) > 0)
      flag = 1;
    else
      flag = -1;
    if (((xc - xb) * (ya - yb) - (xa - xb) * (yc - yb)) * flag < 0)
      printf("N0\n");
    else if (((xd - xc) * (yb - yc) - (xb - xc) * (yd - yc)) * flag < 0)
      printf("N0\n");
    else if (((xa - xd) * (yc - yd) - (xc - xd) * (ya - yd)) * flag < 0)
      printf("N0\n");
    else
      printf("YES\n");
  }
  return 0;
}
