#include <bits/stdc++.h>
int determine(double x1, double y1, double x2, double y2, double x3, double y3,
              double x4, double y4) {
  if (((y2 - y1) * (x3 - x1) - (x2 - x1) * (y3 - y1) > 0 &&
       (y2 - y1) * (x4 - x1) - (x2 - x1) * (y4 - y1) > 0) ||
      ((y2 - y1) * (x3 - x1) - (x2 - x1) * (y3 - y1) < 0 &&
       (y2 - y1) * (x4 - x1) - (x2 - x1) * (y4 - y1) < 0))
    return 1;
  else
    return 0;
}
int intri(double x1, double y1, double x2, double y2, double x3, double y3,
          double x4, double y4) {
  if (determine(x1, y1, x2, y2, x3, y3, x4, y4) == 1 &&
      determine(x3, y3, x2, y2, x1, y1, x4, y4) == 1 &&
      determine(x3, y3, x1, y1, x2, y2, x4, y4) == 1)
    return 1;
  else
    return 0;
}
int main(void) {
  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) != EOF) {
    if (intri(x1, y1, x2, y2, x3, y3, x4, y4) == 1 ||
        intri(x2, y2, x3, y3, x1, y1, x4, y4) == 1 ||
        intri(x3, y3, x2, y2, x2, y2, x4, y4) == 1)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
