#include <bits/stdc++.h>
using namespace std;
double cross(complex<double> a, complex<double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
bool ccw(complex<double> a, complex<double> b, complex<double> c) {
  return cross(b - a, c - a) >= 0;
}
int main() {
  double a[8];
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a[0], &a[1], &a[2], &a[3],
               &a[4], &a[5], &a[6], &a[7]) != EOF) {
    complex<double> b[4];
    for (int i = 0; i < int(4); i++)
      b[i] = complex<double>((double)a[i * 2], (double)a[i * 2 + 1]);
    bool ok = true;
    for (int i = 0; i < int(4); i++) {
      if (!ccw(b[i], b[(i + 1) % 4], b[(i + 2) % 4])) ok = false;
    }
    if (ok)
      puts("YES");
    else
      puts("NO");
  }
}
