#include <bits/stdc++.h>
using namespace std;
static const double PI = 6 * asin(0.5);
double x[5], y[5];
char tmp;
double h[6];
double ang[8];
int main() {
  while (cin >> x[0] >> tmp >> y[0]) {
    bool flag = true;
    for (int i = 0; i < int(3); ++i) {
      cin >> tmp >> x[i + 1] >> tmp >> y[i + 1];
    }
    x[4] = x[0];
    y[4] = y[0];
    for (int i = 0; i < int(4); ++i) {
      double X = x[i + 1] - x[i], Y = y[i + 1] - y[i];
      h[i] = sqrt(X * X + Y * Y);
    }
    h[4] = sqrt((x[2] - x[0]) * (x[2] - x[0]) + (y[2] - y[0]) * (y[2] - y[0]));
    h[5] = sqrt((x[3] - x[1]) * (x[3] - x[1]) + (y[3] - y[1]) * (y[3] - y[1]));
    ang[0] =
        acos((h[0] * h[0] + h[4] * h[4] - h[1] * h[1]) / (2 * h[0] * h[4]));
    ang[1] =
        acos((h[1] * h[1] + h[4] * h[4] - h[0] * h[0]) / (2 * h[1] * h[4]));
    ang[2] =
        acos((h[2] * h[2] + h[4] * h[4] - h[3] * h[3]) / (2 * h[2] * h[4]));
    ang[3] =
        acos((h[3] * h[3] + h[4] * h[4] - h[2] * h[2]) / (2 * h[3] * h[4]));
    ang[4] =
        acos((h[1] * h[1] + h[5] * h[5] - h[2] * h[2]) / (2 * h[1] * h[5]));
    ang[5] =
        acos((h[2] * h[2] + h[5] * h[5] - h[1] * h[1]) / (2 * h[2] * h[5]));
    ang[6] =
        acos((h[4] * h[4] + h[3] * h[3] - h[0] * h[0]) / (2 * h[4] * h[3]));
    ang[7] =
        acos((h[0] * h[0] + h[4] * h[4] - h[3] * h[3]) / (2 * h[0] * h[4]));
    if (PI > (ang[0] + ang[3]) && PI > ang[1] + ang[2]) {
    } else {
      flag = false;
    }
    if (PI > (ang[4] + ang[7]) && PI > ang[5] + ang[7]) {
    } else {
      flag = false;
    }
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
