#include <bits/stdc++.h>
double fun(double x1, double y1, double x2, double y2, double x3, double y3);
int main(void) {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double ABC, ADC, ABD, BCD;
  while (1) {
    scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd,
          &yd);
    ABC = fun(xa, ya, xb, yb, xc, yc);
    ADC = fun(xa, ya, xd, yd, xc, yc);
    ABD = fun(xa, ya, xb, yb, xd, yd);
    BCD = fun(xb, yb, xc, yc, xd, yd);
    if (fabs(ABC + ADC - (ABD + BCD)) < 1e-1)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
double fun(double x1, double y1, double x2, double y2, double x3, double y3) {
  double S;
  S = fabs(((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2);
  return S;
}
