#include <bits/stdc++.h>
int main() {
  while (true) {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    char foo;
    std::cin >> xa >> foo >> ya >> foo >> xb >> foo >> yb >> foo >> xc >> foo >>
        yc >> foo >> xd >> foo >> yd;
    if (std::cin.eof()) {
      break;
    }
    const long double A_C = std::hypot(xa - xc, ya - yc);
    const long double B_D = std::hypot(xb - xd, yb - yd);
    const long double A_BD =
        std::abs((yd - yb) * (xa - xd) - (xd - xb) * (ya - yd)) /
        std::hypot(yd - yb, xd - xb);
    const long double B_AC =
        std::abs((yc - ya) * (xb - xc) - (xc - xa) * (yb - yc)) /
        std::hypot(yc - ya, xc - xa);
    std::cout << (A_C > A_BD && B_D > B_AC ? "YES" : "NO") << std::endl;
  }
  return 0;
}
