module Main where
import qualified Data.ByteString.Char8         as BS
import qualified Data.ByteString.Lazy.Char8    as BSL
import qualified Data.ByteString.Builder       as BSB
import           Data.Char                      ( isSpace )
import           Data.List                      ( unfoldr )
import           Control.Monad
import qualified Data.Vector.Unboxed           as VU
import qualified Data.Vector.Unboxed.Mutable   as VUM

main :: IO ()
main = do
  x <- readLn :: IO Int
  xs <- VU.unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine
  let t = sieve 1000
  let primes = primeTableToList t
  let no = any (\p -> VU.all (\x -> x `mod` p == 0) xs) primes
  let se = any (\p -> 1 < (VU.sum $ VU.map (\x -> if x `mod` p == 0 then 1::Int else 0) xs)) primes
  putStrLn$ if no then "not coprime" else if se then "setwise coprime" else "pairwise coprime"

type PrimeTable = VU.Vector Bool

primeTableToList :: PrimeTable -> [Int]
primeTableToList t = [ i | i <- [0 .. VU.length t - 1], t VU.! i ]

isInPrimeTable :: PrimeTable -> Int -> Bool
isInPrimeTable t n | 0 <= n && n < VU.length t = t VU.! n
                   | otherwise                 = error "out of range"

sieve :: Int -> PrimeTable
sieve n = VU.create $ do
  vec <- VUM.replicate (n + 1) True
  VUM.write vec 0 False
  VUM.write vec 1 False
  forM_ [2 .. n] $ \i -> do
    b <- VUM.read vec i
    when b $ forM_ [2 * i, 3 * i .. n] $ \j -> VUM.write vec j False
  return vec
