#include <bits/stdc++.h>
using namespace std;
double sinvalue(double v1x, double v1y, double v2x, double v2y) {
  return (v1x * v2y - v1y * v2x) / sqrt(v1x * v1x + v1y * v1y) *
         sqrt(v2x * v2x + v2y * v2y);
}
int main() {
  double ax, ay, bx, by, cx, cy, dx, dy;
  double vecx_ab, vecy_ab, vecx_bc, vecy_bc, vecx_cd, vecy_cd, vecx_da, vecy_da;
  double sindab, sinabc, sinbcd, sincda;
  char tmp;
  while (cin >> ax >> tmp >> ay >> tmp >> bx >> tmp >> by >> tmp >> cx >> tmp >>
         cy >> tmp >> dx >> tmp >> dy) {
    vecx_ab = bx - ax;
    vecy_ab = by - ay;
    vecx_bc = cx - bx;
    vecy_bc = cy - by;
    vecx_cd = dx - cx;
    vecy_cd = dy - cy;
    vecx_da = ax - dx;
    vecy_da = ay - dy;
    sindab = sinvalue(vecx_ab, vecy_ab, -vecx_da, -vecy_da);
    sinabc = sinvalue(vecx_bc, vecy_bc, -vecx_ab, -vecy_ab);
    sinbcd = sinvalue(vecx_cd, vecy_cd, -vecx_bc, -vecy_bc);
    sincda = sinvalue(vecx_da, vecy_da, -vecx_cd, -vecy_cd);
    if (sindab > 0 && sinabc > 0 && sinbcd > 0 && sincda > 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
