#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) {
    if (ya == yb && xb == xc && yc == yd && xd == xa)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
