#include <bits/stdc++.h>
using namespace std;
pair<double, double> A[4];
bool check(int pre, int now, int nex) {
  if (pre == 0) return true;
  double a =
      atan2((A[pre].second - A[now].second), (A[pre].first - A[now].first));
  double b =
      atan2((A[nex].second - A[now].second), (A[nex].first - A[now].first));
  if (max(a, b) - min(a, b) >= M_PI / 2.0 &&
      max(a, b) - min(a, b) <= (M_PI / 2.0) * 3)
    return true;
  return false;
}
int main() {
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &A[0].first, &A[0].second,
               &A[1].first, &A[1].second, &A[2].first, &A[2].second,
               &A[3].first, &A[3].second) != EOF) {
    bool f = true;
    for (int i = 0; i < 4; i++) {
      int pre = (i + 3) % 4;
      int now = i;
      int next = (i + 1) % 4;
      if (!check(pre, now, next)) f = false;
    }
    if (f)
      puts("YES");
    else
      puts("NO");
  }
}
