#include <bits/stdc++.h>
using namespace std;
class Point {
 public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(a * x, a * y); }
  Point operator/(double a) { return Point(x / a, y / a); }
  double abs() { return sqrt(norm()); }
  double norm() { return x * x + y * y; }
  bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < 1e-10 && fabs(y - p.y) < 1e-10;
  }
};
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double xa, ya, xb, yb, xc, yc, xd, yd;
char comma;
int main() {
  while (cin >> xa >> comma >> ya >> comma >> xb >> comma >> yb >> comma >>
         xc >> comma >> yc >> comma >> xd >> comma >> yd) {
    Point a(xa, ya);
    Point b(xb, yb);
    Point c(xc, yc);
    Point d(xd, yd);
    Point ab = b - a;
    Point bc = c - b;
    Point cd = d - c;
    Point da = a - d;
    if (cross(ab, bc) > 1e-10) {
      if (cross(bc, cd) > 1e-10 && cross(cd, da) > 1e-10 &&
          cross(da, ab) > 1e-10) {
        cout << "YES" << endl;
        continue;
      }
    } else if (cross(ab, bc) < -1e-10) {
      if (cross(bc, cd) > -1e-10 && cross(cd, da) > -1e-10 &&
          cross(da, ab) > -1e-10) {
        cout << "YES" << endl;
        continue;
      }
    }
    cout << "NO" << endl;
  }
  return 0;
}
