#include <bits/stdc++.h>
int between(double a, double b, double x) {
  if (x < a && x < b || x > a && x > b)
    return 0;
  else
    return 1;
}
int main(void) {
  int i, j;
  double x[4], y[4];
  char hoge;
  int map[20][20];
  double rad_array[4][4];
  int ans;
  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;) {
    for (i = 0; i < 4; i++) {
      for (j = 0; j < 4; j++) {
        if (i != j && x[j] - x[i] && y[j] - y[i]) {
          if (y[j] > y[i] && x[j] > x[i])
            rad_array[i][j] =
                atan((y[j] - y[i]) / (x[j] - x[i])) * 180.0 / 3.141592653589793;
          else if (y[j] > y[i] && x[j] < x[i])
            rad_array[i][j] = atan((y[j] - y[i]) / (x[j] - x[i])) * 180.0 /
                                  3.141592653589793 +
                              180;
          else if (y[j] < y[i] && x[j] < x[i])
            rad_array[i][j] = atan((y[j] - y[i]) / (x[j] - x[i])) * 180.0 /
                                  3.141592653589793 +
                              180;
          else if (y[j] < y[i] && x[j] > x[i])
            rad_array[i][j] = atan((y[j] - y[i]) / (x[j] - x[i])) * 180.0 /
                                  3.141592653589793 +
                              360;
        } else if (y[j] == y[i] && x[j] > x[i])
          rad_array[i][j] = 0.0;
        else if (y[j] == y[i] && x[j] < x[i])
          rad_array[i][j] = 180.0;
        else if (x[j] == x[i] && y[j] > y[i])
          rad_array[i][j] = 90.0;
        else if (x[j] == x[i] && y[j] < y[i])
          rad_array[i][j] = 270.0;
        else
          rad_array[i][j] = 5000;
      }
    }
    ans = 1;
    for (i = 0; i < 4; i++)
      if (between(rad_array[i][(i + 1) % 4], rad_array[i][(i + 2) % 4],
                  rad_array[i][(i + 3) % 4])) {
        ans = 0;
        break;
      }
    if (ans)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
