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