
import Control.Applicative
import Data.List
import Data.Char

getInt :: IO Int
getInt = (\a -> read a :: Int) <$> getLine

getIntArray :: IO [Int]
getIntArray = ((map (\a -> read a :: Int)) . words) <$> getLine

getStrArray :: Int -> IO [String]
getStrArray 0 = return [] :: IO [String]
getStrArray n = (:) <$> getLine <*> (getStrArray (n - 1))

canEat :: [Int] -> String
canEat [a, b]
    | mod a 3 == 0 = "Possible"
    | mod b 3 == 0 = "Possible"
    | mod (a + b) 3 == 0 = "Possible"
    | otherwise = "Impossible"

main = do
    putStrLn =<< (canEat <$> getIntArray)
