#include<iostream.h>
#include<string.h>
//using namespace std;
char start[100],end[100];
#define pi 3.14159;
int main()
{
int amou,ang,rad;
double dist;
while(cin>>start && strcmp("ENDOFINPUT",start))
{
cin>>rad>>amou>>ang;
if(ang>180)
ang=360-ang;
cin>>end;
dist=2*rad*pi;
dist*=2*double(ang)/360;
if(dist>amou*5)
cout<<"NO "<<amou*5<<endl;
else
cout<<"YES "<<int(amou*5-dist)/5<<endl;
}
return 0;
}