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