#include <bits/stdc++.h>
using namespace std;
double is_X(complex<double> p1, complex<double> p2, complex<double> p3,
            complex<double> p4) {
  return ((p1.real() - p2.real()) * (p3.imag() - p1.imag()) +
          (p1.imag() - p2.imag()) * (p1.real() - p3.real())) *
         ((p1.real() - p2.real()) * (p4.imag() - p1.imag()) +
          (p1.imag() - p2.imag()) * (p1.real() - p4.real()));
}
int main() {
  int mod = 1000000007;
  int a, b, c;
  double xa, xb, xc, xd, ya, yb, yc, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    complex<double> a(xa, ya);
    complex<double> b(xb, yb);
    complex<double> c(xc, yc);
    complex<double> d(xd, yd);
    if (is_X(a, b, c, d) > 0.0 || is_X(b, d, a, c) > 0.0) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
