#include <iostream>
#include <complex>
#include <cmath>
#include <algorithm>
using namespace std;

#define FOR(i,a,b) for(int i=a; i<b; i++)
#define REP(i,n) FOR(i,0,n)

using P=complex<double>;

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){
        P t[4]={P(x1,y1),P(x2,y2),P(x3,y3),P(x4,y4)};
        int ans=0;
        REP(i,4){
            P a=t[(i+1)%4]-t[i];
            P b=t[(i+3)%4]-t[i];
            double angle=arg(a/b);
            ans+=angle>0;
        }
        cout<<(abs(ans)==4||ans==0?"YES":"NO")<<endl;
    }
}