#include <bits/stdc++.h>
using namespace std;
int main(void) {
  double xa, xb, xc, xd;
  double ya, yb, yc, yd;
  double ra, rb, rc, rd;
  double ab, bc, cd, da;
  bool flag;
  while (true) {
    flag = false;
    if (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
              &xd, &yd) == EOF)
      break;
    ab = sqrt((ya - yb) * (ya - yb) + (xa - xb) * (xa - xb));
    bc = sqrt((yb - yc) * (yb - yc) + (xb - xc) * (xb - xc));
    cd = sqrt((yc - yd) * (yc - yd) + (xc - xd) * (xc - xd));
    da = sqrt((yd - ya) * (yd - ya) + (xd - xa) * (xd - xa));
    ra = acos(da / ab) / (3.141592653 / 180.0);
    rb = acos(ab / bc) / (3.141592653 / 180.0);
    rc = acos(bc / cd) / (3.141592653 / 180.0);
    rd = acos(cd / da) / (3.141592653 / 180.0);
    cout << ra << endl;
    cout << rb << endl;
    cout << rc << endl;
    cout << rd << endl;
    if (ra < 90 && rb < 90 && rc < 90 && rd < 90) {
      flag = true;
    }
    if (flag) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return (0);
}
