#include<iostream>
#include<stdio.h>
using namespace std;

int main()
{
    double ax,ay,bx,by,cx,cy,dx,dy;
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy))
	{
        if(((ax-cx)*(by-ay)+(ay-cy)*(ax-bx))*((ax-cx)*(dy-ay)+(ay-cy)*(ax-dx))<=0&& ((bx-dx)*(ay-by)+(by-dy)*(bx-ax))*((bx-dx)*(cy-by)+(by-dy)*(bx-cx))<=0)
			cout<<"Yes"<<endl;
        else cout<<"No"<<endl
    }
}