import Control.Applicative

f a b 
	| (a+b) == (a*b) = "E"
	| (a+b) > (a*b) = "S"
	| otherwise = "P"

main = do
	[a,b] <- (map read . words) <$> getLine
	putStrLn $ f a b