#include <bits/stdc++.h>
using namespace std;
bool check(double x1, double y1, double x2, double y2, double x3, double y3,
           double x4, double y4) {
  double res1 = (y2 - y1) * (x3 - x1) / (x2 - x1) - (y3 - y1),
         res2 = (y2 - y1) * (x4 - x1) / (x2 - x1) - (y4 - y1);
  if (res1 > 0 && res2 > 0) return false;
  if (res1 < 0 && res2 < 0) return false;
  if (res1 == 0 || res2 == 0) return false;
  return true;
}
int main() {
  double a, b, c, d, e, f, g, h;
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f\n", &a, &b, &c, &d, &e, &f, &g, &h) !=
         EOF) {
    if (check(a, b, e, f, c, d, g, h) && check(c, d, g, h, a, b, e, f))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
