#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

double cross(double x1,double y1,double x2,double y2)
{
	return x1*y2-x2*y1;
}

string solve(double x[],double y[])
{
	double area=0;
	repi(i,1,3)
		area+=cross(x[i]-x[0],y[i]-y[0],x[i+1]-x[0],y[i+1]-y[0]);
	area=abs(area/2);
	
	rep(i,4){
		double a=abs(cross(x[1]-x[0],y[1]-y[0],x[2]-x[0],y[2]-y[0])/2);
		if(area+1e-10<a)
			return "NO";
		rotate(x,x+1,x+4);
		rotate(y,y+1,y+4);
	}
	return "YES";
}

int main()
{
	for(double x[4],y[4];scanf("%lf,%lf",x,y)==2;){
		repi(i,1,4)
			scanf(",%lf,%lf",x+i,y+i);
		cout<<solve(x,y)<<endl;
	}
	
	return 0;
}