#include <bits/stdc++.h>
int R_1_or_L_2(double x1, double y1, double x2, double y2, double x3,
               double y3) {
  int i;
  if (x1 == x2) return (y2 > y1) ? (x3 > x1 ? 1 : 2) : (x3 < x1 ? 1 : 2);
  if (y1 == y2) return (x2 > x1) ? (y3 < y1 ? 1 : 2) : (y3 > y1 ? 1 : 2);
  if (y3 < (x3 - x1) * (y2 - y1) / (x2 - x1) + y1) return (x1 < x2) ? 1 : 2;
  return (x1 > x2) ? 1 : 2;
}
int main(void) {
  double x[4], y[4];
  char hoge;
  for (; scanf("%lf%c%lf%c%lf%c%lf%c%lf%c%lf%c%lf%c%lf", &x[0], &hoge, &y[0],
               &hoge, &x[1], &hoge, &y[1], &hoge, &x[2], &hoge, &y[2], &hoge,
               &x[3], &hoge, &y[3]) == 15;) {
    if (R_1_or_L_2(x[0], y[0], x[1], y[1], x[2], y[2]) ==
        R_1_or_L_2(x[0], y[0], x[2], y[2], x[3], y[3]))
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
