#include <iostream>
#include <algorithm>
#include <vector>
#include <complex>
#include <string>
#include <sstream>
using namespace std;
typedef complex<double> P;

const int N = 4;
vector<P> g(N);

double cross(P a, P b) {
  return a.real()*b.imag() - a.imag()*b.real();
}

int main() {
  string s;
  while(cin >> s) {
    replace(s.begin(), s.end(), ',', ' ');
    stringstream ss(s);
    for(int i = 0; i < N; ++i) {
      ss >> g[i].real() >> g[i].imag();
    }
    string res = "NO";
    for(int k = 0; k < 2; ++k) {
      for(int i = 0; i < N; ++i) {
	P a = g[(i+1)%N] - g[i];
	P b = g[(i+2)%N] - g[i];
	if(cross(a, b) < 0.0) break;
	if(i+1 == N) res = "YES";
      }
      reverse(g.begin(), g.end());
    }
    cout << res << endl;
  }
  return 0;
}