#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(){
	
	double xa,ya,xb,yb,xc,yc,xd,yd;
	
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
		if(ya==yb&&xb==xc&&yc==yd&&xd==xa)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}