#include <bits/stdc++.h>
double check(double a, double b, double c) {
  double s, S;
  s = (a + b + c) / 2;
  S = sqrt(s * (s - a) * (s - b) * (s - c));
  return S;
}
int main(void) {
  double x[4], y[4], s, t, a, b, c, s1, s2;
  int i, l, f;
  char c1[20], c2[20];
  while ((scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1],
                &x[2], &y[2], &x[3], &y[3])) != EOF) {
    s1 = s2 = 0;
    a = sqrt(pow((x[0] - x[2]), 2) + pow((y[0] - y[2]), 2));
    b = sqrt(pow((x[0] - x[1]), 2) + pow((y[0] - y[1]), 2));
    c = sqrt(pow((x[1] - x[2]), 2) + pow((y[1] - y[2]), 2));
    s1 += check(a, b, c);
    a = sqrt(pow((x[0] - x[2]), 2) + pow((y[0] - y[2]), 2));
    b = sqrt(pow((x[0] - x[3]), 2) + pow((y[0] - y[3]), 2));
    c = sqrt(pow((x[3] - x[2]), 2) + pow((y[3] - y[2]), 2));
    s1 += check(a, b, c);
    a = sqrt(pow((x[1] - x[3]), 2) + pow((y[1] - y[3]), 2));
    b = sqrt(pow((x[0] - x[1]), 2) + pow((y[0] - y[1]), 2));
    c = sqrt(pow((x[0] - x[3]), 2) + pow((y[0] - y[3]), 2));
    s2 += check(a, b, c);
    a = sqrt(pow((x[1] - x[3]), 2) + pow((y[1] - y[3]), 2));
    b = sqrt(pow((x[2] - x[1]), 2) + pow((y[2] - y[1]), 2));
    c = sqrt(pow((x[2] - x[3]), 2) + pow((y[2] - y[3]), 2));
    s2 += check(a, b, c);
    sprintf(c1, "%lf", s1);
    sprintf(c2, "%lf", s2);
    if (strcmp(c1, c2) == 0) {
      printf("YES\n");
      continue;
    } else {
      printf("NO\n");
      break;
    }
  }
  return 0;
}
