#include <stdio.h>
#define S(x,y,a,b,l,r) x*b+a*r+l*y-y*a-l*b-r*x
int main() {double a,b,c,d,o,p,q,r;while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&b,&c,&d,&o,&p,&q,&r)!=EOF) {if (S(a,b,c,d,o,p)==S(c,d,o,p,q,r)==S(o,p,q,r,a,b)==S(q,r,a,b,c,d)) puts("YES"); else puts("NO");} return 0;}