#include<iostream>

using namespace std;

typedef struct{
  double x;
  double y;
}Point;


const int INF = (1<<25);
Point p[4];
double m[4];

void make(){
  for(int i = 0; i < 4; i++){
    if(p[i].x - p[(i+1)%4].x) m[i] = (p[i].y - p[(i+1)%4].y)/ (p[i].x - p[(i+1)%4].x);
    else m[i] = INF;
    //  cout << " "  << m[i] << endl;
  }
}

int solve(){
  make();
  if(m[0] == m[2] && m[1] == m[3]) return 1;
  return 0;
}

int main(){
  int status = 0;
  while(1){
    char t;
    for(int i = 0; i < 3; i++) if(!(cin >> p[i].x >> t >> p[i].y >> t)) status = 1;
    if(status) break;
    if(!(cin >> p[3].x >> t >> p[3].y)) status = 1;
    if(status) break;
    if(solve()) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}