#include <bits/stdc++.h>
using namespace std;
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double sab, sac, sbc, tab, tac, tbc;
  bool flag;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    sab = (yb - ya) / (xb - xa);
    sac = (yc - ya) / (xc - xa);
    sbc = (yc - yb) / (xc - xb);
    tab = ya - sab * xa;
    tac = ya - sac * xa;
    tbc = yb - sbc * xb;
    if (ya > yc)
      flag = (sab * xd + tab - yd > 0 && sac * xd + tac - yd < 0 &&
              sbc * xd + tbc - yd < 0);
    else
      flag = (sab * xd + tab - yd < 0 && sac * xd + tac - yd < 0 &&
              sbc * xd + tbc - yd > 0);
    cout << (flag ? "YES\n" : "NO\n");
  }
  return 0;
}
