#include <bits/stdc++.h>
using namespace std;
bool equal(double a, double b) {
  return (fabs(a - b) < (1e-10)) ? true : false;
}
class Triangle {
 private:
  complex<double> a, b, c;
  double edgeA, edgeB, edgeC;
  double angleA, angleB, angleC;
  double LawOfCosines(double a, double b, double c) {
    return acos((b * b + c * c - a * a) / (2.0 * b * c));
  }

 public:
  Triangle(complex<double> p1, complex<double> p2, complex<double> p3) {
    a = p1;
    b = p2;
    c = p3;
    edgeB = abs(c - a);
    edgeA = abs(b - c);
    edgeC = abs(a - b);
    angleA = LawOfCosines(edgeA, edgeB, edgeC);
    angleB = LawOfCosines(edgeB, edgeC, edgeA);
    angleC = LawOfCosines(edgeC, edgeA, edgeB);
  }
  double getAngleA() { return angleA; }
  double getAngleB() { return angleB; }
  double getAngleC() { return angleC; }
};
int main() {
  double xa, xb, xc, xd, ya, yb, yc, yd, angleA, angleB, angleC, angleD;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    complex<double> a(xa, ya);
    complex<double> b(xb, yb);
    complex<double> c(xc, yc);
    complex<double> d(xd, yd);
    Triangle Tr1(a, b, c);
    Triangle Tr2(a, d, c);
    angleA = Tr1.getAngleA() + Tr2.getAngleA();
    angleC = Tr1.getAngleC() + Tr2.getAngleC();
    angleB = Tr1.getAngleB();
    angleD = Tr2.getAngleB();
    if (angleA <= 3.1415926535898 && angleB <= 3.1415926535898 &&
        angleC <= 3.1415926535898 && angleD <= 3.1415926535898) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
