#include <bits/stdc++.h>
struct Vector2D {
  double x;
  double y;
};
struct Vector2D sub_vector(struct Vector2D *a, struct Vector2D *b) {
  struct Vector2D ret;
  ret.x = b->x - a->x;
  ret.y = b->y - a->y;
  return ret;
};
int main(void) {
  struct Vector2D a, b, c, d;
  struct Vector2D vecAB, vecBC, vecCD, vecDA;
  double c1, c2, c3, c4;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.x, &a.y, &b.x, &b.y, &c.x,
               &c.y, &d.x, &d.y) != EOF) {
    vecAB = sub_vector(&a, &b);
    vecBC = sub_vector(&b, &c);
    vecCD = sub_vector(&c, &d);
    vecDA = sub_vector(&d, &a);
    c1 = vecAB.x * vecBC.y - vecAB.y * vecBC.x;
    c2 = vecBC.x * vecCD.y - vecBC.y * vecCD.x;
    c3 = vecCD.x * vecDA.y - vecCD.y * vecDA.x;
    c4 = vecDA.x * vecAB.y - vecDA.y * vecAB.x;
    if (c1 > 0 && c2 > 0 && c3 > 0 && c4 > 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
