#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 product / v / u;
}
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    if (arg(xb - xa, yb - ya, xd - xa, yd - ya) < 0)
      cout << "NO" << endl;
    else if (arg(xc - xb, yc - yb, xa - xb, ya - yb) < 0)
      cout << "NO" << endl;
    else if (arg(xd - xc, yd - yc, xb - xc, yb - yc) < 0)
      cout << "NO" << endl;
    else if (arg(xc - xd, yc - yd, xa - xd, ya - yd) < 0)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
