#include <bits/stdc++.h>
using namespace std;
template <typename T>
void FILL_(void* ptr, size_t size, T value) {
  std::fill((T*)ptr, (T*)ptr + size, value);
}
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};
int main() {
  double xa, xb, xc, xd, ya, yb, yc, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    double td = (xa - xc) * (yd - ya) + (ya - yc) * (xa - xd);
    double tb = (xa - xc) * (yb - ya) + (ya - yc) * (xa - xd);
    double ta = (xb - xd) * (xa - yb) + (yb - yd) * (xb - xa);
    double tc = (xb - xd) * (xc - yb) + (yb - yd) * (xb - xc);
    if (td * tb > 0.0 || ta * tc > 0.0)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
