#include <bits/stdc++.h>
using namespace std;
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;
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 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; }
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.norm() < b.norm()) return ONLINE_FRONT;
  return ON_SEGMENT;
}
int main() {
  char line[100];
  while (fgets(line, sizeof(line), stdin) != NULL) {
    Point p[6];
    sscanf(line, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &p[0].x, &p[0].y, &p[1].x,
           &p[1].y, &p[2].x, &p[2].y, &p[3].x, &p[3].y);
    p[4] = p[0], p[5] = p[1];
    bool flag = true;
    for (int i = 1; i <= 4; i++) {
      if (ccw(p[i - 1], p[i], p[i + 1]) != 1) flag = false;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
