a,b=map(int,input().split()) if a*b>a+b: print("M") elif a*b==a+b: print("E") else: print("S")