#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9;
const long double INF = 1e10;
const long double PI = M_PI;
struct Point {
  long double x, y;
  Point(long double x, long double y) : x(x), y(y) {}
  Point() {}
};
Point operator+(const Point &a, const Point &b) {
  return Point(a.x + b.x, a.y + b.y);
}
Point operator-(const Point &a, const Point &b) {
  return Point(a.x - b.x, a.y - b.y);
}
Point operator*(const Point &a, const long double b) {
  return Point(a.x * b, a.y * b);
}
Point operator*(const Point &a, const Point &b) {
  return Point(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
Point operator/(const Point &a, const long double b) {
  return Point(a.x / b, a.y / b);
}
Point next(const vector<Point> &a, int x) { return a[(x + 1) % a.size()]; }
Point prev(const vector<Point> &a, int x) {
  return a[(x - 1 + a.size()) % a.size()];
}
long double cross(const Point &a, const Point &b) {
  return a.x * b.y - a.y * b.x;
}
long double dot(const Point &a, const Point &b) {
  return a.x * b.x + a.y * b.y;
}
long double norm(const Point &a) { return dot(a, a); }
int ccw(Point a, Point b, Point c) {
  b = b - a;
  c = c - a;
  if (cross(b, c) > EPS) return +1;
  if (cross(b, c) < -EPS) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool is_convex(const vector<Point> &poly) {
  for (int i = 0; i < (int)poly.size(); i++) {
    if (ccw(prev(poly, i), poly[i], next(poly, i)) == -1) return false;
  }
  return true;
}
int main() {
  long double xa, ya, xb, yb, xc, yc, xd, yd;
  char c;
  while (cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >>
         c >> xd >> c >> yd) {
    vector<Point> poly;
    poly.push_back(Point(xa, ya));
    poly.push_back(Point(xb, yb));
    poly.push_back(Point(xc, yc));
    poly.push_back(Point(xd, yd));
    cout << (is_convex(poly) ? "YES" : "NO") << endl;
  }
  return 0;
}
