#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
unsigned long long sttoi(std::string str) {
  unsigned long long ret;
  std::stringstream ss;
  ss << str;
  ss >> ret;
  return ret;
}
long long gcd(long long a, long long b) {
  if (b > a) swap(a, b);
  if (b == 0)
    return a;
  else {
    return gcd(b, a % b);
  }
}
double rad(double ax, double ay, double bx, double by, double cx, double cy) {
  double px, py, qx, qy;
  px = bx - ax;
  qx = bx - cx;
  py = by - ay;
  qy = by - cy;
  return (px * py + qx * qy) /
         (sqrt((px * px + qx * qx) * (py * py + qy * qy)));
}
void solve() {
  double x[4], y[4];
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1],
               &x[2], &y[2], &x[3], &y[3])) {
    double sum = 0.0;
    for (int i = 0; i < 4; i++) {
      sum += acos(rad(x[i % 4], y[i % 4], x[i + 1 % 4], y[i + 1 % 4],
                      x[i + 2 % 4], y[i + 2 % 4]));
    }
    if (sum < 2 * 3.1415926535) {
      cout << ("NO") << endl;
      ;
    } else {
      cout << ("YES") << endl;
      ;
    }
  }
}
int main() {
  solve();
  return 0;
}
