import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- getIntList
    let ps = map length . group . sort $ concatMap factorize as
    let pmax = maximum ps
    let ans | pmax == 1 = "pairwise coprime"
            | pmax /= n = "setwise coprime"
            | otherwise = "not coprime"
    putStrLn ans

f n k
  | n < k = n
  | n `mod` k == 0 = f (n `div` k) k
  | otherwise = f (n `mod` k) k
 
primes = map fromIntegral primes'
  where
    primes' = [2, 3, 5] ++ f 5 7 (drop 2 primes')
    f m s (p:ps) = [n | n <- ns, gcd m n == 1] ++ f (m * p) (p * p) ps
      where
        ns = [x + y | x <- [s,s + 6 .. p * p - 2], y <- [0, 4]]

factorize 1 = []
factorize n = format $ factorize' n primes
  where
    format ps = [x | (x:_) <- group ps]
    factorize' n ps@(p:ps')
      | p * p > n = [n]
      | rem n p == 0 = p : factorize' (div n p) ps
      | otherwise = factorize' n ps'