#include <bits/stdc++.h>
using namespace std;
double tri2s(double xa, double ya, double xb, double yb, double xc, double yc) {
  double a, b, c, s;
  a = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc));
  b = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));
  c = sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya));
  s = (a + b + c) / 2;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
int main(void) {
  double x[4], y[4];
  double sq;
  double tri[4];
  bool isok = true;
  while (cin >> x[0]) {
    cin.ignore();
    cin >> y[0];
    cin.ignore();
    cin >> x[1];
    cin.ignore();
    cin >> y[1];
    cin.ignore();
    cin >> x[2];
    cin.ignore();
    cin >> y[2];
    cin.ignore();
    cin >> x[3];
    cin.ignore();
    cin >> y[3];
    if (tri2s(x[0], y[0], x[1], y[1], x[2], y[2]) +
            tri2s(x[0], y[0], x[2], y[2], x[3], y[3]) ==
        tri2s(x[0], y[0], x[1], y[1], x[3], y[3]) +
            tri2s(x[2], y[2], x[1], y[1], x[3], y[3])) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
    isok = true;
  }
  return 0;
}
