#include<iostream>
#include<cmath>
using namespace std;
int main(){
char c;
double xa,ya,xb,yb,xc,yc,xd,yd,ab,bc,cd,da,aa,bb,cc,dd;
while(cin>>xa){
cin>>c>>ya>>c>>xb>>c>>yb>>c>>xc>>c>>yc>>c>>xd>>c>>yd;
aa=sqrt((xb-xa)*(xb-xa));
bb=sqrt((xc-xb)*(xc-xb));
cc=sqrt((xd-xc)*(xd-xc));
dd=sqrt((xa-xd)*(xa-xd));
ab=((xb-xa)*(xc-xb)+(yb-ya)*(yc-yb))/(aa*bb);
bc=((xc-xb)*(xd-xc)+(yc-yb)*(yd-yc))/(bb*cc);
cd=((xd-xc)*(xa-xd)+(yd-yc)*(ya-yd))/(cc*dd);
da=((xa-xd)*(xb-xa)+(ya-yd)*(yb-ya))/(dd*aa);
if(ab*bc<0||bc*cd<0||cd*da<0||da*ab<0)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
return 0;
}