#include<iostream>
using namespace std;
int main(){
char e;
double xa,ya,xb,yb,xc,yc,xd,yd,a,b,c,d;
while(cin>>xa){
cin>>e>>ya>>e>>xb>>e>>yb>>e>>xc>>e>>yc>>e>>xd>>e>>yd;
a=(xb-xa)*(xc-xb)+(yb-ya)*(yc-yb);
b=(xc-xb)*(xd-xc)+(yc-yb)*(yd-yc);
c=(xd-xc)*(xa-xd)+(yd-yc)*(ya-yd);
d=(xa-xd)*(xb-xa)+(ya-yd)*(yb-ya);
if(a*b<0||b*c<0||c*d<0||d*a<0)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
return 0;
}