#include <bits/stdc++.h>
using namespace std;
double xa, ya, xb, yb, xc, yc, xd, yd;
int a, cnt, cnt2;
char ch;
double di(double x, double y) { return sqrt(x * x + y * y); }
int f(double x1, double y1, double x2, double y2) {
  double a = x1 * y2 - x2 * y1;
  if (a > 0.0)
    return 1;
  else
    return -1;
}
int main() {
  while (cin >> xa >> ch >> ya >> ch >> xb >> ch >> yb >> ch >> xc >> ch >>
         yc >> ch >> xd >> ch >> yd) {
    a = f(xa - xb, ya - yb, xb - xc, yb - yc);
    if (a > 0)
      cnt++;
    else if (a == 0)
      cnt++, cnt2++;
    else
      cnt2++;
    a = f(xb - xc, yb - yc, xc - xd, yc - yd);
    if (a > 0)
      cnt++;
    else if (a == 0)
      cnt++, cnt2++;
    else
      cnt2++;
    a = f(xc - xd, yc - yd, xd - xa, yd - ya);
    if (a > 0)
      cnt++;
    else if (a == 0)
      cnt++, cnt2++;
    else
      cnt2++;
    a = f(xd - xa, yd - ya, xa - xb, ya - yb);
    if (a > 0)
      cnt++;
    else if (a == 0)
      cnt++, cnt2++;
    else
      cnt2++;
    if (cnt == 4 || cnt2 == 4)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
