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