#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<double> x(4), y(4);
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f", &x[0], &y[0], &x[1], &y[1], &x[2],
               &y[2], &x[3], &y[3]) != EOF) {
    bool b = false;
    if ((x[1] - x[0] < x[2] - x[0] && x[3] - x[0] > x[2] - x[0]) ||
        (x[1] - x[0] > x[2] - x[0] && x[3] - x[0] < x[2] - x[0]) ||
        (y[1] - y[0] < y[2] - y[0] && y[3] - y[0] > y[2] - y[0]) ||
        (y[1] - y[0] > y[2] - y[0] && y[3] - y[0] < y[2] - y[0])) {
      b = true;
    }
    if (b) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
    x.clear();
    y.clear();
  }
}
