#include <bits/stdc++.h>
using namespace std;
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
int is_intersected_ls(complex<double> a1, complex<double> a2,
                      complex<double> b1, complex<double> b2) {
  return (cross(a2 - a1, b1 - a1) * cross(a2 - a1, b2 - a1) < 1e-10) &&
         (cross(b2 - b1, a1 - b1) * cross(b2 - b1, a2 - b1) < 1e-10);
}
int main() {
  double ax, ay, bx, by, cx, cy, dx, dy;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ax, &ay, &bx, &by, &cx, &cy,
               &dx, &dy) != EOF) {
    complex<double> a = complex<double>(ax, by);
    complex<double> b = complex<double>(bx, by);
    complex<double> c = complex<double>(cx, cy);
    complex<double> d = complex<double>(dx, dy);
    if ((abs(is_intersected_ls(a, c, d, b) - 0.0) < 1e-10))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
