#include <iostream>
#include <cmath>
#include <string>
using namespace std;
string pal(string n)
{
int flag = 0 , sz = n.size() ;
for (int i = 0 , j = sz - 1; i < sz /2 && j >= sz /2 ; i++ , j--) {
if (n[i] != n[j]) {
flag = 1 ;
break ;
}
}
if (flag==0) return "yes" ;
else return "no" ;
}
int main()
{
string n ;
cin >> n ;
int sum = 0 ;
for (int i = 0 ; i < n.size() ; i++) {
sum+= n[i] - '0' ;
}
if (stoi(n) % sum == 0 && pal(n) == "yes") cout << "Best mentor." ;
else if ( (stoi(n) % sum != 0 && pal(n) == "yes") || (stoi(n) % sum == 0 && pal(n) == "no") ) cout << "He's good." ;
else cout << "He'll be fired." ;
}