#include <bits/stdc++.h>
using namespace std;
const double ERR = 1e-8;
double rnddouble(double d) {
  long l = 1 / ERR;
  return (double)round(d * l) / l;
}
double area(pair<double, double> A, pair<double, double> B,
            pair<double, double> C) {
  double ab = sqrt((A.first - B.first) * (A.first - B.first) +
                   (A.second - B.second) * (A.second - B.second));
  double ac = sqrt((A.first - C.first) * (A.first - C.first) +
                   (A.second - C.second) * (A.second - C.second));
  double bc = sqrt((B.first - C.first) * (B.first - C.first) +
                   (B.second - C.second) * (B.second - C.second));
  double b = rnddouble(ab * ab + ac * ac - bc * bc) / 2 / ab / ac;
  double theta = acos(b);
  double a = 0.5 * ab * ac * sin(theta);
  return a;
}
bool insideTriangle(pair<double, double> A, pair<double, double> B,
                    pair<double, double> C, pair<double, double> P) {
  if (abs(area(A, B, P) + area(B, C, P) + area(C, A, P) - area(A, B, C)) < ERR)
    return true;
  return false;
}
pair<double, double> middle(pair<double, double> A, pair<double, double> B) {
  return make_pair((A.first + B.first) / 2, (A.second + B.second) / 2);
}
int main() {
  float x1, y1, x2, y2, x3, y3, x4, y4;
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f", &x1, &y1, &x2, &y2, &x3, &y3, &x4,
               &y4) != EOF) {
    pair<double, double> A, B, C, D;
    A = make_pair(x1, y1);
    B = make_pair(x2, y2);
    C = make_pair(x3, y3);
    D = make_pair(x4, y4);
    if ((insideTriangle(A, B, D, middle(A, C)) ||
         insideTriangle(C, B, D, middle(A, C))) &&
        (insideTriangle(A, B, D, middle(B, D)) ||
         insideTriangle(C, B, D, middle(B, D))))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
