#include <bits/stdc++.h>
using namespace std;
struct Vector {
  double x;
  double y;
};
double gaiseki(Vector* a, Vector* b) {
  return (a->x) * (b->y) - (a->y) * (b->x);
}
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) {
    Vector ab, bc, ac, da, bd, dc;
    ab.x = xb - xa;
    ab.y = yb - ya;
    bc.x = xc - xb;
    bc.y = yc - yb;
    ac.x = xc - xa;
    ac.y = yc - ya;
    da.x = xa - xd;
    da.y = ya - yd;
    bd.x = xd - xb;
    bd.y = yd - yb;
    dc.x = xc - xd;
    dc.y = yc - yd;
    double abac, bdbc, dadc;
    abac = gaiseki(&ab, &ac);
    bdbc = gaiseki(&bd, &bc);
    dadc = gaiseki(&da, &dc);
    if ((abac < 0 && bdbc < 0 && dadc < 0) ||
        (abac > 0 && bdbc > 0 && dadc > 0))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
