#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <limits>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <complex>

using namespace std;

//define
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF (INT_MAX/3)
#define PI (2*acos(0.0))
#define EPS (1e-8)

typedef long long ll;
typedef unsigned long long ull;

int main(){
  ios_base::sync_with_stdio(0);
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double c1, c2, c3, c4;
  pair<double, double> v1, v2, v3, v4;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF){
    v1 = pair<double, double>(xb - xa, yb - ya);
    v2 = pair<double, double>(xc - xb, yc - yb);
    v3 = pair<double, double>(xd - xc, yd - yc);
    v4 = pair<double, double>(xa - xd, ya - yd);
    c1 = v1.first * v2.second - v1.second * v2.first;
    c2 = v2.first * v3.second - v2.second * v3.first;
    c3 = v3.first * v4.second - v3.second * v4.first;
    c4 = v4.first * v1.second - v4.second * v1.first;
    if(c1 * c2 * c3 * c4 < 0) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}