import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines a,b = map(int,read().split()) s = a + b p = a * b if s > p: answer = 'S' elif s == p: answer = 'E' else: answer = 'P' print(answer)