#include <bits/stdc++.h>
using namespace std;
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yc) != EOF) {
    bool f1 = (((xb - xd) * (ya - yb) - (yb - yd) * (xa - xb)) *
                   ((xb - xd) * (yc - yb) - (yb - yd) * (xc - xb)) <
               0);
    bool f2 = (((xa - xc) * (yb - ya) - (ya - yc) * (xb - xa)) *
                   ((xa - xc) * (yd - ya) - (ya - yc) * (xd - xa)) <
               0);
    if (f1 && f2) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
