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