#include <bits/stdc++.h>
using namespace std;
int main() {
  double x[6];
  double y[6];
  while (~scanf("%lf,%lf,", &x[1], &y[1])) {
    for (int i = 0; i < (int)(3); i++) scanf("%lf,%lf,", &x[i + 2], &y[i + 2]);
    x[5] = x[1];
    x[0] = x[4];
    y[5] = y[1];
    y[0] = y[4];
    bool ans = true;
    for (int i = 0; i < (int)(4); i++) {
      double dx1 = x[i + 1] - x[i];
      double dx2 = x[i + 2] - x[i + 1];
      double dy1 = y[i + 1] - y[i];
      double dy2 = y[i + 2] - y[i + 1];
      double outp = (dx1 * dy2 - dx2 * dy1);
      if (outp <= 0.0) ans = false;
    }
    puts(ans ? "YES" : "NO");
  }
  return 0;
}
