#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator*(double a) { return Point(a * x, a * 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); }
  double norm() { return x * x + y * y; }
};
struct Segment {
  Point p1, p2;
};
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
bool isPrallel(Segment s1, Segment s2) {
  return (fabs((cross(s1.p2 - s1.p1, s2.p2 - s2.p1)) - (0.0)) < (1e-10));
}
bool isOrthogonal(Segment s1, Segment s2) {
  return (fabs((dot(s1.p2 - s1.p1, s2.p2 - s2.p1)) - (0.0)) < (1e-10));
}
int contains(vector<Point> g, Point p) {
  int n = g.size();
  bool x = false;
  for (int i = 0; i < n; i++) {
    Point a = g[i] - p, b = g[(i + 1) % n] - p;
    if (abs(cross(a, b)) < (1e-10) && dot(a, b) < (1e-10)) return 1;
    if (a.y > b.y) swap(a, b);
    if (a.y < (1e-10) && (1e-10) < b.y && cross(a, b) > (1e-10)) x = !x;
  }
  return x ? 2 : 0;
}
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > (1e-10)) return 1;
  if (cross(a, b) < -(1e-10)) return -1;
  if (dot(a, b) < -(1e-10)) return 2;
  if (a.norm() < b.norm()) return -2;
  return 0;
}
bool intersect(Point p1, Point p2, Point p3, Point p4) {
  return (ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 &&
          ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0);
}
bool intersect(Segment s1, Segment s2) {
  return intersect(s1.p1, s1.p2, s2.p1, s2.p2);
}
Point project(Segment s, Point p) {
  Point base = s.p2 - s.p1;
  double r = dot(p - s.p1, base) / base.norm();
  return s.p1 + base * r;
}
Point reflect(Segment s, Point p) { return p + (project(s, p) - p) * 2.0; }
bool isconvex(vector<Point> g) {
  for (int i = 0; i < g.size(); i++)
    if (ccw(g[(i + g.size() - 1) % g.size()], g[i], g[(i + 1) % g.size()]) <= 0)
      return false;
  return true;
}
int main() {
  double x1, y1, x2, y2, x3, y3, x4, y4;
  while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3,
                &x4, &y4)) {
    puts(isconvex({{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}}) ? "YES" : "NO");
  }
}
