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