a = input() b = input() plus = int(a) + int(b) time = int(a) * int(b) if plus > time: print('S') elif time > plus: print('P') else: print('E')