#include <bits/stdc++.h>
using namespace std;
struct Vector {
  double x;
  double y;
};
bool is_convex(double xa, double ya, double xb, double yb, double xc, double yc,
               double xd, double yd) {
  Vector ab = Vector{xb - xa, yb - ya};
  Vector bc = Vector{xc - xb, yc - yb};
  Vector bd = Vector{xd - xb, yd - yb};
  Vector dc = Vector{xc - xd, yc - yd};
  Vector da = Vector{xa - xd, ya - yd};
  Vector ac = Vector{xc - xa, yc - ya};
  double cross_product_1 = ab.x * bc.y - ab.y * bc.x;
  double cross_product_2 = bd.x * dc.y - bd.y * dc.x;
  double cross_product_3 = da.x * ac.y - da.y * ac.x;
  return (cross_product_1 > 0 && cross_product_2 > 0 && cross_product_3 > 0) ||
         (cross_product_1 < 0 || cross_product_2 < 0 && cross_product_3 < 0);
}
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  string result;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    if (is_convex(xa, ya, xb, yb, xc, yc, xd, yd)) {
      result = "NO";
    } else {
      result = "YES";
    }
    cout << result << endl;
  }
  return 0;
}
