//WA了很多次,百度了一下,才知道原来是小数与整数之间的错误,还不够细心!
#include "iostream"
#include "string"
using namespace std;
const int pi = 3.14159;
int main()
{
string tag1, tag2;
double X, Y, Z, distance, abledistance, remain;
while (cin >> tag1)
{
if (tag1 == "ENDOFINPUT")
break;
cin >> X >> Y >> Z;
cin >> tag2;
distance = abledistance = remain = 0;
if (Z > 180)
Z = 360 - Z;
distance = 2 * 2 * X * pi * Z / 360;
abledistance = 5 * Y;
if (abledistance >= distance)
{
remain = Y - distance / 5;
cout << "YES " << (int)remain << endl;
}
else
{
cout << "NO " <<(int) abledistance << endl;
}
}
}