#include <bits/stdc++.h>
int main() {
  double x[5], y[5], d[9], s, s1, s2;
  int f;
  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) {
    f = 0;
    d[0] = sqrt((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]));
    d[1] = sqrt((x[2] - x[1]) * (x[2] - x[1]) + (y[2] - y[1]) * (y[2] - y[1]));
    d[2] = sqrt((x[2] - x[0]) * (x[2] - x[0]) + (y[2] - y[0]) * (y[2] - y[0]));
    d[3] = sqrt((x[3] - x[0]) * (x[3] - x[0]) + (y[3] - y[0]) * (y[3] - y[0]));
    d[4] = sqrt((x[3] - x[1]) * (x[3] - x[1]) + (y[3] - y[1]) * (y[3] - y[1]));
    d[5] = sqrt((x[3] - x[2]) * (x[3] - x[2]) + (y[3] - y[2]) * (y[3] - y[2]));
    s1 = s2 = 0.0;
    f = 0;
    s = (d[0] + d[1] + d[2]) / 2;
    s1 += sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
    s = (d[0] + d[3] + d[4]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[3]) * (s - d[4]));
    s = (d[1] + d[4] + d[5]) / 2;
    s2 += sqrt(s * (s - d[1]) * (s - d[4]) * (s - d[5]));
    s = (d[2] + d[5] + d[3]) / 2;
    s2 += sqrt(s * (s - d[2]) * (s - d[5]) * (s - d[3]));
    if (s2 - s1 <= 0.000001) f++;
    s1 = s2 = 0.0;
    s = (d[1] + d[4] + d[5]) / 2;
    s1 += sqrt(s * (s - d[1]) * (s - d[4]) * (s - d[5]));
    s = (d[0] + d[1] + d[2]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
    s = (d[0] + d[3] + d[4]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[3]) * (s - d[4]));
    s = (d[2] + d[5] + d[3]) / 2;
    s2 += sqrt(s * (s - d[2]) * (s - d[5]) * (s - d[3]));
    if (s2 - s1 <= 0.000001) f++;
    s1 = s2 = 0.0;
    s = (d[2] + d[3] + d[5]) / 2;
    s1 += sqrt(s * (s - d[2]) * (s - d[3]) * (s - d[5]));
    s = (d[0] + d[1] + d[2]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
    s = (d[0] + d[3] + d[4]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[3]) * (s - d[4]));
    s = (d[0] + d[1] + d[2]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
    if (s2 - s1 <= 0.000001) f++;
    s1 = s2 = 0.0;
    s = (d[0] + d[3] + d[4]) / 2;
    s1 += sqrt(s * (s - d[0]) * (s - d[3]) * (s - d[4]));
    s = (d[0] + d[1] + d[2]) / 2;
    s2 += sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
    s = (d[2] + d[3] + d[5]) / 2;
    s2 += sqrt(s * (s - d[2]) * (s - d[3]) * (s - d[5]));
    s = (d[1] + d[4] + d[5]) / 2;
    s2 += sqrt(s * (s - d[1]) * (s - d[4]) * (s - d[5]));
    if (s2 - s1 <= 0.000001) f++;
    printf("%s", (!f) ? "YES\n" : "NO\n");
  }
  return 0;
}
