#include <bits/stdc++.h>
using namespace std;
int main() {
  double x[4], y[4];
  double xa, ya, xb, yb;
  char c;
  int isConvex;
  int i;
  while (cin >> x[0] >> c >> y[0]) {
    for (i = 1; i < 4; i++) cin >> c >> x[i] >> c >> y[i];
    isConvex = 1;
    for (i = 1; i <= 4; i++) {
      xa = x[i - 1] - x[i % 4];
      ya = y[i - 1] - y[i % 4];
      xb = x[(i + 1) % 4] - x[i % 4];
      yb = y[(i + 1) % 4] - y[i % 4];
      if (xa * yb - ya * xb > 0) isConvex = 0;
    }
    if (isConvex)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
