#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1) * 4;
int side(double a, double b, double c, double d) {
  double det = a * d - b * c;
  return det / abs(det);
}
int main() {
  double x[6], y[6];
  while (scanf("%lf,%lf", x, y) == 2) {
    for (int i = 1; i < 4; i++) scanf(",%lf,%lf", x + i, y + i);
    for (int i = 0; i < 2; i++) x[i + 4] = x[i];
    int s = 0;
    for (int i = 0; i < 4; i++)
      s += side(x[i + 1] - x[i], y[i + 1] - y[i], x[i + 2] - x[i + 1],
                y[i + 2] - y[i + 1]);
    puts(s == 4 || s == -4 ? "YES" : "NO");
  }
  return 0;
}
