#include <bits/stdc++.h>
using namespace std;
double cross(complex<double> a, complex<double> b) { return imag(conj(a) * b); }
int main() {
  double x, y;
  complex<double> in[4], p[4];
  while (scanf("%lf,%lf,", &x, &y) != EOF) {
    for (int i = 1; i < 4; i++) {
      if (i != 3)
        scanf("%lf,%lf,", &x, &y);
      else
        scanf("%lf,%lf", &x, &y);
      in[i] = complex<double>(x, y);
    }
    for (int i = 0; i < 4; i++) p[i] = in[(i + 1) % 4] - in[i];
    bool check[4];
    for (int i = 0; i < 4; i++)
      check[i] = (cross(p[i], p[(i + 1) % 4]) > 0) ? true : false;
    if ((check[0] & check[1] & check[2] & check[3]) ||
        (!check[0] & !check[1] & !check[2] & !check[3]))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
