#include <bits/stdc++.h>
int main(void) {
  double x1, y1, x2, y2, x3, y3, x4, y4;
  double cp1, cp2, cp3, cp4;
  int conv;
  while (scanf("%lf,", &x1) != EOF) {
    scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf", &y1, &x2, &y2, &x3, &y3, &x4, &y4);
    conv = 1;
    cp1 = (x2 - x1) * (x1 - x4) - (y2 - y1) * (y1 - y4);
    cp2 = (x3 - x2) * (x2 - x1) - (y3 - y2) * (y2 - y1);
    cp3 = (x4 - x3) * (x3 - x2) - (y4 - y3) * (y3 - y2);
    cp4 = (x1 - x4) * (x4 - x3) - (y1 - y4) * (y4 - y3);
    if (cp1 * cp2 < -1e-10) conv = 0;
    if (cp2 * cp3 < -1e-10) conv = 0;
    if (cp3 * cp4 < -1e-10) conv = 0;
    if (cp4 * cp1 < -1e-10) conv = 0;
    puts(conv ? "YES" : "NO");
  }
  return 0;
}
