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