A,B=map(int,input().split())
if A*B == A+B: 
	print('E')
	exit()
if A*B > A+B: print('P')
else: print('S')