#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e10;
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator-(const Point &o) const { return Point(x - o.x, y - o.y); }
  Point operator+(const Point &o) const { return Point(x + o.x, y + o.y); }
  Point operator*(const double m) const { return Point(x * m, y * m); }
  double dot(const Point &o) const { return x * o.x + y * o.y; }
  double cross(const Point &o) const { return x * o.y - y * o.x; }
  double norm() const { return dot(*this); }
};
int ccw(Point a, Point b, Point c) {
  b = b - a, c = c - a;
  if (b.cross(c) > EPS) return +1;
  if (b.cross(c) < -EPS) return -1;
  if (b.dot(c) < 0) return +2;
  if (b.norm() < c.norm()) return -2;
  return 0;
}
int main() {
  Point a, b, c, d;
  string s;
  while (getline(cin, s)) {
    for (int k = s.find(','); k != string::npos; k = s.find(',')) {
      s[k] = ' ';
    }
    istringstream ss(s);
    ss >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y;
    if (ccw(a, b, c) == ccw(b, c, d) && ccw(b, c, d) == ccw(c, d, a)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
