#include <bits/stdc++.h>
using namespace std;
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    double a = 999999, b = 999999, c = 999999, d = 999999;
    if (xb != xa) a = (yb - ya) / (xb - xa);
    if (xc != xd) b = (yc - yd) / (xc - xd);
    if (xc != xb) c = (yc - yb) / (xc - xb);
    if (xd != xa) d = (yd - ya) / (xd - xa);
    if (a == b && c == d)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
