a,b = map(int,input().split()) add = a+b mul = a*b if add==mul: print('E') elif add>mul: print('S') else: print('P')