#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); }
  double own_dot() { return x * x + y * y; };
  double abs() { return sqrt(own_dot()); }
  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 dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > (1e-10)) return COUNTER_CLOCKWISE;
  if (cross(a, b) < -(1e-10)) return CLOCKWISE;
  if (dot(a, b) < -(1e-10)) return ONLINE_BACK;
  if (a.own_dot() < b.own_dot()) return ONLINE_FRONT;
  return ON_SEGMENT;
}
vector<Point> P;
Point in[4];
bool isconvex() {
  for (int i = 0; i < P.size(); i++)
    if (ccw(P[(i + P.size() - 1) % P.size()], P[(i) % P.size()],
            P[(i + 1) % P.size()]) <= 0)
      return false;
  return true;
}
int main() {
  while (1) {
    char c;
    for (int i = 0; i < 4; i++)
      if (i == 3)
        cin >> in[i].x >> c >> in[i].y;
      else if (!(cin >> in[i].x >> c >> in[i].y >> c))
        return 0;
    P.clear();
    for (int i = 0; i < 4; i++) P.push_back(in[i]);
    if (isconvex())
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
