#include <bits/stdc++.h>
using namespace std;
double angle(double c, double b, double a) {
  return (acos((b * b + c * c - a * a) / (2 * b * c)) * 180.0 / M_PI);
}
int main() {
  double ax, ay, bx, by, cx, cy, dx, dy;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ax, &ay, &bx, &by, &cx, &cy,
               &dx, &dy) != EOF) {
    complex<double> a = complex<double>(ax, by);
    complex<double> b = complex<double>(bx, by);
    complex<double> c = complex<double>(cx, cy);
    complex<double> d = complex<double>(dx, dy);
    double angles = 0.0;
    angles += angle(abs(a - d), abs(a - b), abs(d - b));
    angles += angle(abs(b - a), abs(b - c), abs(a - c));
    angles += angle(abs(c - b), abs(c - d), abs(d - b));
    angles += angle(abs(d - a), abs(d - c), abs(a - c));
    if ((abs(angles - 360.0) < 1e-10))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
