#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1);

#define AB2 ((x[1] - x[0])*(x[1] - x[0]) + (y[1] - y[0])*(y[1] - y[0]))
#define BC2 (x[2] - x[1])*(x[2] - x[1]) + (y[2] - y[1])*(y[2] - y[1])
#define CD2 (x[3] - x[2])*(x[3] - x[2]) + (y[3] - y[2])*(y[3] - y[2])
#define DA2 (x[0] - x[3])*(x[0] - x[3]) + (y[0] - y[3])*(y[0] - y[3])
#define CA2 (x[0] - x[2])*(x[0] - x[2]) + (y[0] - y[2])*(y[0] - y[2])
#define BD2 (x[3] - x[1])*(x[3] - x[1]) + (y[3] - y[1])*(y[3] - y[1])

int main(){
  double x[4], y[4];
  bool rad = true;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]) != EOF){
    if((x[1] - x[0]) * (x[3] - x[0]) + (y[1] - y[0]) * (y[3] - y[0]) < 0){
      rad = false;
    }
    if((x[0] - x[3]) * (x[2] - x[3]) + (y[0] - y[3]) * (y[2] - y[3]) < 0){

      rad = false;
    }
    if((x[3] - x[2]) * (x[1] - x[2]) + (y[3] - y[2]) * (y[1] - y[2]) < 0){

      rad = false;
    }
    if((x[0] - x[1]) * (x[2] - x[1]) + (y[0] - y[1]) * (y[2] - y[1]) < 0){

      rad = false;
    }
    if(rad == true){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}