#include <iostream>
#include <complex>

using namespace std;
typedef complex<double> P;

double cr(P a,P b){return (conj(a)*b).imag();}

int main(){
  P a,b,c,d;
  char com;
  while(cin >> a.real() >> com >> a.imag() >> com >> b.real() >> com >> b.imag() >> com >> c.real() >> com >> c.imag() >> com >> d.real() >> com >> d.imag()){
    P e=a-b,f=b-c,g=c-d,h=d-a;
    double i=cr(e,f),j=cr(f,g),k=cr(g,h),l=cr(h,e);
    if((i>0&&j>0&&k>0&&l>0)||(i<0&&j<0&&k<0&&l<0))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}