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