#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L;
const D EPS = (1e-10);
D dot(P a, P b) { return (conj(a) * b).real(); }
D cross(P a, P b) { return (conj(a) * b).imag(); }
int ccw(P a, P b, P c) {
  b -= a;
  c -= a;
  if (cross(b, c) > EPS) return +1;
  if (cross(b, c) < -EPS) return -1;
  if (dot(b, c) < -EPS) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
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, &yd) != EOF) {
    P p[4] = {P(xa, ya), P(xb, yb), P(xc, yc), P(xd, yd)};
    bool ok = true;
    for (int i = 0; i < 4; i++) {
      if (ccw(p[i], p[(i + 1) % 4], p[(i + 2) % 4]) !=
          ccw(p[(i + 1) % 4], p[(i + 2) % 4], p[(i + 3) % 4])) {
        ok = false;
        break;
      }
    }
    if (ok) {
      std::cout << "YES" << std::endl;
    } else {
      std::cout << "NO" << std::endl;
    }
  }
  return 0;
}
