#include<iostream>
#include<float.h>
using namespace std;

int main(){
    double pos[4][2];
    double slope[4];
    bool zero[4];
    double temp;
    int lors;
    bool result;
    int i, j;
    char comma;
    while(cin >> pos[0][0]){
        cin >> comma >> pos[0][1];
        for(i=1;i<4;i++){
            for(j=0;j<2;j++){
                cin >> comma >> pos[i][j];
            }
        }
        for(i=0;i<4;i++){
            temp = pos[i%4][0] - pos[(i+1)%4][0];
            if(temp == 0){
                slope[i] = DBL_MAX;
                zero[i] = true;
            }else{
                slope[i] = (pos[i%4][1] - pos[(i+1)%4][1])/temp;
                zero[i] = false;
            }
        }
        result = true;
        for(i=0;i<2;i++){
            cout << endl;
            if(slope[0] > slope[1]){
                lors = 0;
            }else{
                lors = 1;
            }
            for(j=1;j<4;j++){
                if(slope[j%4] > slope[(j+1)%4] && !lors){
                    result = false;
                    break;
                }else if(slope[j%4] < slope[(j+1)%4] && lors){
                    result = false;
                    break;
                }else{
                    lors = 1 - lors;
                }
            }
            for(j=0;j<4;j++){
                if(zero[j]){
                    slope[j] = DBL_MIN;
                }
            }

        }
        if(result){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}