import Control.Applicative ((<$>))

judge :: Integral a => a -> a -> String
judge x y
    | s > p = "S"
    | s < p = "P"
    | otherwise = "E"
    where
        s = x + y
        p = x * y

main :: IO ()
main = do
    [a, b] <- fmap read . words <$> getLine :: IO [Integer]
    putStrLn $ judge a b