#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, x2, y2, x3, y3, x4, y4;
  char c;
  while (cin >> c >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> x3 >> c >>
         y3 >> c >> x4 >> c >> y4) {
    complex<double> t[4] = {complex<double>(x1, y1), complex<double>(x2, y2),
                            complex<double>(x3, y3), complex<double>(x4, y4)};
    int ans = 0;
    for (int i = 0; i < 4; i++) {
      complex<double> a = t[(i + 1) % 4] - t[i];
      complex<double> b = t[(i + 3) % 4] - t[i];
      double angle = arg(a / b);
      ans += angle > 0;
    }
    cout << (abs(ans) == 4 || ans == 0 ? "YES" : "NO") << endl;
  }
}
