#include <iostream>
#include <cstdio>
#include <cmath>

#define SQ(x) (x)*(x)
#define pi 3.141592653

using namespace std;

int main(void){
    
    double xa,xb,xc,xd;
    double ya,yb,yc,yd;
    double ra,rb,rc,rd;
    double ab,bc,cd,da;
    bool flag;
    
    while(true){
        
        flag=false;
        
        if(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)==EOF)break;
        
        ab=sqrt(SQ(ya-yb)+SQ(xa-xb));
        bc=sqrt(SQ(yb-yc)+SQ(xb-xc));
        cd=sqrt(SQ(yc-yd)+SQ(xc-xd));
        da=sqrt(SQ(yd-ya)+SQ(xd-xa));
        
        ra=acos(da/ab)/(pi/180.0);
        rb=acos(ab/bc)/(pi/180.0);
        rc=acos(bc/cd)/(pi/180.0);
        rd=acos(cd/da)/(pi/180.0);
        
        cout<<ra<<endl;
        cout<<rb<<endl;
        cout<<rc<<endl;
        cout<<rd<<endl;
        
        if(ra<90&&rb<90&&rc<90&&rd<90){
            flag=true;
        }
        if(flag){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return(0);
}