#include <bits/stdc++.h>
using namespace std;
double isIntersect(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() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  char e;
  while (cin >> xa >> e >> ya >> e >> xb >> e >> yb >> e >> xc >> e >> yc >>
         e >> e >> xd >> e >> yd) {
    complex<double> a(xa, ya);
    complex<double> b(xb, yb);
    complex<double> c(xc, yc);
    complex<double> d(xd, yd);
    if (isIntersect(a, c, b, d) > 0 || isIntersect(b, d, a, c) > 0) {
      cout << "NO" << endl;
    } else
      cout << "YES" << endl;
  }
  return 0;
}
