#include <cstdio>
#include <cmath>
#define vertex 4
#define PI (atan(1.0) * 4.0)

using namespace std;

int main(void){
	int i;
	double x[vertex], y[vertex], theta, ax, ay, bx, by, sum;
	while(scanf("%lf%*c%lf%*c",&x[0],&y[0]) != EOF){
		for(i = 1;i < vertex;i++){
			scanf("%lf%*c%lf%*c",&x[i],&y[i]);
		}
		sum = 0;
		for(i = 0;i < vertex;i++){
			ax = x[i] - x[(i + 1) % vertex];
			ay = y[i] - y[(i + 1) % vertex];
			bx = x[(i + 2) % vertex] - x[(i + 1) % vertex];
			by = y[(i + 2) % vertex] - y[(i + 1) % vertex];
			theta = 180 * acos((ax * bx + ay * by) / (sqrt(pow(ax,2.0) + pow(ay,2.0)) * sqrt(pow(bx,2.0) + pow(by,2.0)))) / PI;
			sum += theta;
		}
		if(sum == 360){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}