#include <bits/stdc++.h>
double outerproduct(double xa, double ya, double xb, double yb) {
  return xa * yb - xb * ya;
}
int main() {
  double x[4], y[4], op1, op2, op3, op4;
  scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1], &x[2],
        &y[2], &x[3], &y[3]);
  op1 = outerproduct(x[2] - x[0], y[2] - y[0], x[1] - x[0], y[1] - y[0]);
  op2 = outerproduct(x[3] - x[1], y[3] - y[1], x[2] - x[1], y[2] - y[1]);
  op3 = outerproduct(x[0] - x[2], y[0] - y[2], x[3] - x[2], y[3] - y[2]);
  op4 = outerproduct(x[1] - x[3], y[1] - y[3], x[0] - x[3], y[0] - y[3]);
  if (((op1 > 0.0) && (op2 > 0.0) && (op3 > 0.0) && (op4 > 0.0)) ||
      ((op1 < 0.0) && (op2 < 0.0) && (op3 < 0.0) && (op4 < 0.0)))
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
