#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

bool check(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {
	double res1 = (y2-y1)*(x3-x1)/(x2-x1)-(y3-y1), res2 = (y2-y1)*(x4-x1)/(x2-x1)-(y4-y1);
	if (res1 > 0 && res2 > 0) return false;
	if (res1 < 0 && res2 < 0) return false;
	if (res1 == 0 || res2 == 0) return false;
	return true;

}
int main() {
	double a,b,c,d,e,f,g,h;
	while (scanf("%f,%f,%f,%f,%f,%f,%f,%f\n",&a,&b,&c,&d,&e,&f,&g,&h)!=EOF) {
		if (check(a,b,e,f,c,d,g,h) && check(c,d,g,h,a,b,e,f)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}