#include <bits/stdc++.h>
using namespace std;
const int MAX_SIZE = 10000;
double dot(complex<double> a, complex<double> b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
using namespace std;
int main() {
  double x[4];
  double y[4];
  char cm;
  while (cin >> x[0]) {
    cin >> cm;
    cin >> y[0];
    for (int i = 1; i < 4; i++) {
      cin >> cm >> x[i] >> cm >> y[i];
    }
    complex<double> A1(x[1] - x[0], y[1] - y[0]);
    complex<double> A2(x[3] - x[0], y[3] - y[0]);
    complex<double> B1(x[2] - x[1], y[2] - y[1]);
    complex<double> B2(x[0] - x[1], y[0] - y[1]);
    complex<double> C1(x[3] - x[2], y[3] - y[2]);
    complex<double> C2(x[1] - x[2], y[1] - y[2]);
    complex<double> D1(x[0] - x[3], y[0] - y[3]);
    complex<double> D2(x[2] - x[3], y[2] - y[3]);
    double t1 = cross(A1, A2);
    double t2 = cross(B1, B2);
    double t3 = cross(C1, C2);
    double t4 = cross(D1, D2);
    if (cross(A1, A2) < 0 || cross(B1, B2) < 0 || cross(C1, C2) < 0 ||
        cross(D1, D2) < 0) {
      cout << "NO" << endl;
    } else
      cout << "YES" << endl;
  }
  return 0;
}
