#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  while (cin >> str) {
    double x[4], y[4];
    string keep;
    vector<string> set;
    int flag = 0;
    double a[4];
    double s[4];
    int j = 0;
    for (int i = 0; i <= str.length(); i++) {
      if (str[i] == ',' || str.length() == i) {
        set.push_back(keep);
        keep.clear();
      } else
        keep += str[i];
    }
    stringstream ss;
    for (int i = 0, j = 0; i < 4; i++, j += 2) {
      ss << set[j];
      ss >> x[i];
      ss.clear();
      ss.str("");
      ss << set[j + 1];
      ss >> y[i];
      ss.clear();
      ss.str("");
    }
    for (int i = 0; i < 4; i++) {
      if (x[(i + 1) % 4] - x[i] != 0)
        a[i] = (y[(i + 1) % 4] - y[i]) / (x[(i + 1) % 4] - x[i]);
      else
        a[i] = 9999999;
    }
    double sum = 0;
    for (int i = 0; i < 4; i++) {
      double set[100] = {};
      set[0] = fabs(a[i] * a[(i + 1) % 4] + 1);
      set[1] = sqrt(a[i] * a[i] + 1);
      set[2] = sqrt(a[(i + 1) % 4] * a[(i + 1) % 4] + 1);
      if (set[1] * set[2] == 0)
        s[i] = 90;
      else
        s[i] = acos(set[0] / (set[1] * set[2])) * 180 / 3.14159265358979;
      sum += s[i];
    }
    if (fabs(360 - sum) >= 179.9999)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
