#include <bits/stdc++.h>
using namespace std;
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
bool isPalallel(complex<double> a1, complex<double> a2, complex<double> b1,
                complex<double> b2) {
  return (abs((cross(a1 - a2, b1 - b2)) - (0.0)) < 1e-10);
}
int main(void) {
  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) {
    complex<double> a(xa, ya), b(xb, yb), c(xc, yc), d(xd, yd);
    if (isPalallel(a, b, d, c) && isPalallel(d, a, c, b))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return (0);
}
