#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-10;
double add(double a, double b) {
  if (abs(a + b) < EPS * (abs(a) + abs(b))) {
    return 0;
  }
  return a + b;
}
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  P operator+(P p) { return P(add(x, p.x), add(y, p.y)); }
  P operator-(P p) { return P(add(x, -p.x), add(y, -p.y)); }
  P operator*(double d) { return P(x * d, y * d); }
  double dot(P p) { return add(x * p.x, y * p.y); }
  double det(P p) { return add(x * p.y, -y * p.x); }
};
bool on_seg(P p1, P p2, P q) {
  return (p1 - q).det(p2 - q) == 0 && (p1 - q).dot(p2 - q) <= 0;
}
P intersection(P p1, P p2, P q1, P q2) {
  return p1 + (p2 - p1) * ((q2 - q1).det(q1 - p1) / (q2 - q1).det(p2 - p1));
}
int ccw(P a, P b, P c) {
  a = b - a;
  b = b - c;
  if (a.det(b) < 0) {
    return -1;
  } else if (a.det(b) > 0) {
    return 1;
  } else if (a.det(b) == 0) {
    return 0;
  }
}
int main() {
  P a, b, c, d;
  char dummy;
  while (cin >> a.x >> dummy >> a.y >> dummy >> b.x >> dummy >> dummy >> b.y >>
         dummy >> c.x >> dummy >> c.y >> dummy >> d.x >> dummy >> d.y) {
    int count = 0, ans = 0;
    count += ccw(a, b, c);
    ans += abs(ccw(a, b, c));
    count += ccw(b, c, d);
    ans += abs(ccw(b, c, d));
    count += ccw(c, d, a);
    ans += abs(ccw(c, d, a));
    count += ccw(d, a, b);
    ans += abs(ccw(d, a, b));
    if (abs(count) == ans) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
