#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;

int main() {
	vector <double> x(4), y(4);
	while (scanf("%f,%f,%f,%f,%f,%f,%f,%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]) != EOF) {
		bool b = false;
		// (x1-x0, y1-y0) (x2-x0, y2-y0) (x3-x0, y3-y0)
		if ((x[1]-x[0] < x[2]-x[0] && x[3]-x[0] > x[2]-x[0]) || (x[1]-x[0] > x[2]-x[0] && x[3]-x[0] < x[2]-x[0]) || (y[1]-y[0] < y[2]-y[0] && y[3]-y[0] > y[2]-y[0]) || (y[1]-y[0] > y[2]-y[0] && y[3]-y[0] < y[2]-y[0])) {
			b = true;
		}
		if (b) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
		x.clear(); y.clear();
	}
}