#include <bits/stdc++.h>
int main() {
  double a, b, c, d, o, p, q, r;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a, &b, &c, &d, &o, &p, &q,
               &r) != EOF) {
    if (a * d + c * p + o * b - b * c - o * d - p * a ==
        c * p + o * r + q * d - d * o - q * p - r * c ==
        o * r + q * b + a * p - p * q - a * r - b * o ==
        q * b + a * d + c * r - r * a - c * b - d * q)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
