m,kg = map(float,input().split()) b = kg/m**2 if(b<18.5): print("A") elif(b<24): print("B") elif(b<28): print("C") else : print("D")