#include <bits/stdc++.h>
using namespace std;
double sq(double x) { return x * x; }
double cross(complex<double> x, complex<double> y) {
  return x.real() * y.imag() - x.imag() * y.real();
}
int main() {
  double x[4], y[4];
  while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", x, y, x + 1, y + 1, x + 2,
                y + 2, x + 3, y + 3)) {
    complex<double> p[4];
    for (int i = 0; i < 4; i++) p[i] = complex<double>(x[i], y[i]);
    bool f = true;
    for (int i = 0; i < 4; i++) {
      if (cross(p[i] - p[(i + 1) & 3], p[(i + 2) & 3] - p[(i + 1) & 3]) > 0)
        f = false;
    }
    if (f)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
