A, B = map(int, input().split()) S = A + B P = A * B if S > P: print('S') elif S < P: print('P') else: print('E')