#include <bits/stdc++.h>
using namespace std;
int main() {
  double xa = 0, ya = 0, xb = 0, yb = 0, xc = 0, yc = 0, xd = 0, yd = 0;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    double a = 0, b = 0, d = 0;
    pair<double, double> AD, AC, DB, DC, BA, BC;
    AD.first = xd - xa;
    AD.second = yd - ya;
    AC.first = xc - xa;
    AC.second = yc - ya;
    a = AD.second * AC.first - AD.first * AC.second;
    DB.first = xb - xd;
    DB.second = yb - yd;
    DC.first = xc - xd;
    DC.second = yc - yd;
    d = DB.second * DC.first - DB.first * DC.second;
    BA.first = xa - xb;
    BA.second = ya - yb;
    BC.first = xc - xb;
    BC.second = yc - yb;
    b = BA.second * BC.first - BA.first * BC.second;
    if ((a >= 0 && b >= 0 && d >= 0) || (a < 0 && b < 0 && d < 0))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
