#define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
using namespace std;
int main(){
	
	float xa,ya,xb,yb,xc,yc,xd,yd;
	
	while(scanf("%f,%f,%f,%f,%f,%f,%f,%f",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
		float a,b,c,d;
		
		//if(xb!=xa)
		a=(yb-ya)/(xb-xa);
		//if(xc!=xd)
		b=(yc-yd)/(xc-xd);
		//if(xc!=xb)
		c=(yc-yb)/(xc-xb);
		//if(xd!=xa)
		d=(yd-ya)/(xd-xa);
		
	
		if(a==b&&c==d)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}