#include <bits/stdc++.h>
using namespace std;
string str;
double arg(double vx, double vy, double ux, double uy) {
  double v = sqrt(vx * vx + vy * vy);
  double u = sqrt(ux * ux + uy * uy);
  double product = vx * vy + ux * uy;
  return abs(product) / v / u;
}
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double large, small;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    large = arg(xa - xd, ya - yd, xc - xd, yc - yd);
    small = arg(xb - xd, yb - yd, xc - xd, yc - yd);
    if (large > small) {
      cout << "NO" << endl;
      continue;
    }
    large = arg(xb - xa, yb - ya, xd - xa, yd - ya);
    small = arg(xc - xa, yc - ya, xd - xa, yd - ya);
    if (large > small) {
      cout << "NO" << endl;
      continue;
    }
    large = arg(xc - xb, yc - yb, xa - xb, ya - yb);
    small = arg(xd - xb, yd - yb, xa - xb, ya - yb);
    if (large > small) {
      cout << "NO" << endl;
      continue;
    }
    large = arg(xd - xc, yd - yc, xb - xc, yb - yc);
    small = arg(xa - xc, ya - yc, xb - xc, yb - yc);
    if (large > small) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
  }
}
