#include <bits/stdc++.h>
using namespace std;
int cnt = 0;
void check(double xa, double ya, double xb, double yb, double xc, double yc,
           double xd, double yd);
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  char c;
  while (cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >>
         c >> xd >> c >> yd) {
    check(xa, ya, xb, yb, xc, yc, xd, yd);
    if (cnt) {
      continue;
    }
    cnt = 0;
    check(xb, yb, xc, yc, xd, yd, xa, ya);
    if (cnt) {
      continue;
    }
    cnt = 0;
    check(xc, yc, xd, yd, xa, ya, xb, yb);
    if (cnt) {
      continue;
    }
    cnt = 0;
    check(xd, yd, xa, ya, xb, yb, xc, yc);
    if (cnt) {
      continue;
    }
    cnt = 0;
    cout << "NO" << endl;
  }
  return 0;
}
void check(double xa, double ya, double xb, double yb, double xc, double yc,
           double xd, double yd) {
  double tc = (xa - xb) * (yc - ya) + (ya - yb) * (xa - xc);
  double td = (xa - xb) * (yd - ya) + (ya - yb) * (xa - xd);
  if (tc * td < 0) {
    double ta = (xc - xd) * (ya - yc) + (yc - yd) * (xc - xa);
    double tb = (xc - xd) * (yb - yc) + (yc - yd) * (xc - xb);
    if (ta * tb < 0) {
      cout << "YES" << endl;
      cnt++;
    }
  } else {
    if ((xb - xa) * (xd - xa) + (yb - ya) * (yd - ya) == 0) {
      if ((xc - xd) * (xc - xb) + (yc - yd) * (yc - yb) == 0) {
        cout << "YES" << endl;
        cnt++;
      }
    }
  }
}
