#include <iostream>
#include <cmath>
using namespace std;
int main ( ) {
double n, x, y, r, yee;
while ( cin >> n ) {
for ( int i = 0; i < n; i++ ) {
cin >> x >> y;
r = sqrt ( ( x - 0 ) + ( y - 0 ) );
yee = 100 - r * r;
if ( yee > 0 && yee <= 30 )
cout << "sad!" << endl;
else if ( yee > 30 && yee <= 60 )
cout << "hmm~~" << endl;
else if ( yee > 60 && yee < 100 )
cout << "Happyyummy" << endl;
else
cout << "evil!!" << endl;
}
}
}