#include <bits/stdc++.h>
const double PI = acos(-1);
const double EPS = 1e-10;
using namespace std;
struct L : public vector<complex<double> > {
  L(const complex<double> &a, const complex<double> &b) {
    push_back(a);
    push_back(b);
  }
};
namespace std {
bool operator<(const complex<double> &a, const complex<double> &b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
complex<double> pin() {
  double x, y;
  cin >> x >> y;
  complex<double> p(x, y);
  return p;
}
void PIN(complex<double> *a, int n) {
  for (int i = 0; i < n; i++) a[i] = pin();
}
double dot(complex<double> a, complex<double> b) { return real(conj(a) * b); }
double cross(complex<double> a, complex<double> b) { return imag(conj(a) * b); }
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
complex<double> projection(L a, complex<double> p) {
  double t = dot(p - a[0], a[0] - a[1]) / norm(a[0] - a[1]);
  return a[0] + t * (a[0] - a[1]);
}
complex<double> reflection(L a, complex<double> p) {
  return p + 2.0 * (projection(a, p) - p);
}
bool intersectLL(const L &l, const L &m) {
  return abs(cross(l[1] - l[0], m[1] - m[0])) > EPS ||
         abs(cross(l[1] - l[0], m[0] - l[0])) < EPS;
}
bool intersectLS(const L &l, const L &s) {
  return cross(l[1] - l[0], s[0] - l[0]) * cross(l[1] - l[0], s[1] - l[0]) <
         EPS;
}
bool intersectLP(const L &l, const complex<double> &p) {
  return abs(cross(l[1] - p, l[0] - p)) < EPS;
}
bool intersectSS(const L &s, const L &t) {
  return ccw(s[0], s[1], t[0]) * ccw(s[0], s[1], t[1]) <= 0 &&
         ccw(t[0], t[1], s[0]) * ccw(t[0], t[1], s[1]) <= 0;
}
bool intersectSP(const L &s, const complex<double> &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}
complex<double> intersect_ls(L a, L b) {
  double t1 = abs(cross(a[1] - a[0], b[0] - a[0]));
  double t2 = abs(cross(a[1] - a[0], b[1] - a[0]));
  return b[0] + (b[1] - b[0]) * t1 / (t1 + t2);
}
double distanceLP(const L &l, const complex<double> &p) {
  if (dot(l[1] - l[0], p - l[0]) < EPS) return abs(p - l[0]);
  if (dot(l[0] - l[1], p - l[1]) < EPS) return abs(p - l[1]);
  return abs(p - projection(l, p));
}
double distanceLL(const L &l, const L &m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(const L &l, const L &s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(const L &s, const complex<double> &p) {
  const complex<double> r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}
double distanceSS(const L &s, const L &t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}
bool intersectCL(complex<double> c, double r, const L &l) {
  return (distanceLP(l, c) < r + EPS &&
          (r < abs(c - l[0]) + EPS || r < abs(c - l[1]) + EPS));
}
L circles_point(complex<double> c1, double r1, complex<double> c2, double r2) {
  double d = abs(c1 - c2);
  double s = (r1 + r2 + d) / 2;
  double S = sqrt(s * (s - r1) * (s - r2) * (s - d));
  double h = 2 * S / d;
  complex<double> v = (c2 - c1) / (abs(c2 - c1));
  double m = sqrt(r1 * r1 - h * h);
  complex<double> a = c1 + m * v + h * v * complex<double>(0, 1);
  complex<double> b = c1 + m * v - h * v * complex<double>(0, 1);
  if (b < a) swap(a, b);
  return L(a, b);
}
complex<double> crosspoint(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0];
  return m[0] + B / A * (m[1] - m[0]);
}
double area(const vector<complex<double> > &g) {
  double S = 0;
  for (int i = 0; i < g.size(); i++) {
    S += (cross(g[i], g[(i + 1) % g.size()]));
  }
  return abs(S / 2.0);
}
bool isconvex(const vector<complex<double> > &g) {
  int n = g.size();
  for (int i = 0; i < n; i++)
    if (ccw(g[(i + n - 1) % n], g[i % n], g[(i + 1) % n]) == -1) return false;
  return true;
}
int contain(const vector<complex<double> > &g, const complex<double> &p) {
  bool in = false;
  int n = g.size();
  for (int i = 0; i < n; i++) {
    complex<double> a = g[i % n] - p;
    complex<double> b = g[(i + 1) % n] - p;
    if (imag(a) > imag(b)) swap(a, b);
    if (imag(a) <= 0 && 0 < imag(b))
      if (cross(a, b) < 0) in = !in;
    if (cross(a, b) == 0 && dot(a, b) <= 0) return 1;
  }
  return in ? 2 : 0;
}
vector<complex<double> > convex_hull(vector<complex<double> > &ps) {
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<complex<double> > ch(2 * n);
  for (int i = 0; i < n; ch[k++] = ps[i++])
    while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) == -1) --k;
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--])
    while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) == -1) --k;
  ch.resize(k - 1);
  return ch;
}
double convex_diameter(const vector<complex<double> > &pt) {
  const int n = pt.size();
  int is = 0, js = 0;
  for (int i = 1; i < n; ++i) {
    if (imag(pt[i]) > imag(pt[is])) is = i;
    if (imag(pt[i]) < imag(pt[js])) js = i;
  }
  double maxd = norm(pt[is] - pt[js]);
  int i, maxi, j, maxj;
  i = maxi = is;
  j = maxj = js;
  do {
    if (cross((pt[(i + 1) % pt.size()] - pt[i]),
              (pt[(j + 1) % pt.size()] - pt[j])) >= 0)
      j = (j + 1) % n;
    else
      i = (i + 1) % n;
    if (norm(pt[i] - pt[j]) > maxd) {
      maxd = norm(pt[i] - pt[j]);
      maxi = i;
      maxj = j;
    }
  } while (i != is || j != js);
  return sqrt(maxd);
}
vector<complex<double> > convex_cut(const vector<complex<double> > &g,
                                    const L &l) {
  vector<complex<double> > Q;
  for (int i = 0; i < g.size(); ++i) {
    complex<double> a = g[i], b = g[(i + 1) % g.size()];
    if (ccw(l[0], l[1], a) != -1) Q.push_back(a);
    if (ccw(l[0], l[1], a) * ccw(l[0], l[1], b) < 0)
      Q.push_back(crosspoint(L(a, b), l));
  }
  return Q;
}
complex<double> turn(complex<double> p, double t) {
  return p * exp(complex<double>(.0, t * PI / 180.0));
}
int main() {
  double x[4], y[4];
  char d;
  while (cin >> x[0] >> d >> y[0]) {
    for (int i = 1; i < 4; i++) cin >> d >> x[i] >> d >> y[i];
    vector<complex<double> > g(4);
    for (int i = 0; i < 4; i++) g[i] = complex<double>(x[i], y[i]);
    if (isconvex(g))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
