#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) {
    bool rad = true;
    if ((x[1] - x[0]) * (x[3] - x[0]) + (y[1] - y[0]) * (y[3] - y[0]) < 0) {
      rad = false;
    }
    if ((x[0] - x[3]) * (x[2] - x[3]) + (y[0] - y[3]) * (y[2] - y[3]) < 0) {
      rad = false;
    }
    if ((x[3] - x[2]) * (x[1] - x[2]) + (y[3] - y[2]) * (y[1] - y[2]) < 0) {
      rad = false;
    }
    if ((x[0] - x[1]) * (x[2] - x[1]) + (y[0] - y[1]) * (y[2] - y[1]) < 0) {
      rad = false;
    }
    if (rad == true) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
