import Data.Char (isSpace) import Control.Applicative ((<$>)) import Data.List (unfoldr) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B getL :: (ByteString -> [Integer]) -> IO [Integer] getL f = f <$> B.getLine readIL :: (ByteString -> Maybe (Integer, ByteString)) -> (ByteString -> [Integer]) readIL f = unfoldr g where g s = do (n, s') <- f s return (n, B.dropWhile isSpace s') main :: IO () main = do [a, b] <- getL (readIL B.readInteger) if a == b && a == 0 then putStrLn "E" else if a == 0 || b == 0 || a == 1 || b == 1 then putStrLn "S" else putStrLn "P"