#include <bits/stdc++.h>
int main(void) {
  float xa, ya, xb, yb, xc, yc, xd, yd;
  float line1_x, line2_x;
  while (scanf("%f,%f,%f,%f,%f,%f,%f,%f", &xa, &ya, &xb, &yb, &xc, &yc, &xd,
               &yd) != EOF) {
    line1_x = 1;
    line2_x = 0;
    if (xb - xa != 0 && xd - xc != 0) {
      line1_x = ((yb - ya) / (xb - xa));
      line2_x = ((yd - yc) / (xd - xc));
    }
    if (line1_x == line2_x) {
      printf("YES\n");
    } else {
      if (xc - xa != 0 && xd - xb != 0) {
        line1_x = ((yd - ya) / (xd - xa));
        line2_x = ((yc - yb) / (xc - xb));
      }
      if (line1_x == line2_x) {
        printf("YES\n");
      } else {
        printf("NO\n");
      }
    }
  }
  return (0);
}
