import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import Data.List (unfoldr, mapAccumL)
import qualified Data.Vector.Unboxed as VU
import Data.Maybe (catMaybes)
import Data.Bool (bool)

main :: IO ()
main = do
  let
    primeFactors :: Int -> [(Int, Int)]
    primeFactors n = filter ((/= 0) . snd) . unfoldr next $ Just (n, 2, 0)
      where
        next :: Maybe (Int, Int, Int) -> Maybe ((Int, Int), Maybe (Int, Int, Int))
        next (Just (m, d, c)) | m < d     = Just ((d, c), Nothing)
                              | r == 0    = next (Just (m', d, succ c))
                              | m < d * d = Just ((d, c), Just (m, m, 0))
                              | otherwise = Just ((d, c), Just (m, succ d, 0))
          where
            (m', r) = m `divMod` d
        next _                            = Nothing
    primes :: [Int]
    primes = smaller ++ larger
      where
        smaller :: [Int]
        smaller = [2, 3, 5, 7]
        larger :: [Int]
        larger = spin p4 w4 `sMinusP` composites larger w4
        spin :: Int -> [Int] -> [Int]
        spin k ds = scanl (+) k (cycle ds)
        composites :: [Int] -> [Int] -> [Int]
        composites ps w = foldr dUnionP undefined . snd . mapAccumL step w $ ps
          where
            step :: [Int] -> Int -> ([Int], [Int])
            step w p = (snd . nextWheel $ (p, w), spin (p * p) . map (p *) $ w)
        dUnionP :: [Int] -> [Int] -> [Int]
        dUnionP (x : xs) ys = x : dUnion xs ys
        dUnion xs@(x : xs') ys@(y : ys') | y < x     = y : dUnion xs ys'
                                         | otherwise = x : dUnion xs' ys
        sMinusP :: [Int] -> [Int] -> [Int]
        sMinusP (x : xs) ys = x : sMinus xs ys
        sMinus :: [Int] -> [Int] -> [Int]
        sMinus (x : xs') ys@(y : ys') | x == y    = sMinus xs' ys'
                                      | otherwise = x : sMinus xs' ys
    (p4, w4) = nextWheel . nextWheel . nextWheel . nextWheel $ (2, [1])
    nextWheel :: (Int, [Int]) -> (Int, [Int])
    nextWheel = uncurry nextWheel'
      where
        nextWheel' :: Int -> [Int] -> (Int, [Int])
        nextWheel' p = nextWheel''
          where
            nextWheel'' :: [Int] -> (Int, [Int])
            nextWheel'' w@(h : t) = (p', w')
              where
                p' = p + h :: Int
                w' = erase h $ t ++ concat (replicate (pred p) w) ++ [h] :: [Int]
--            erase :: Int -> [Int] -> [Int]
--            erase c (h : t) | c' /= 0 = h : erase c' t
--              where
--                c' = (c + h) `mod` p
--            erase c (h : (h' : t)) = erase c (h + h' : t)
--            erase _ _ = []
--            
            erase :: Int -> [Int] -> [Int]
            erase = ((catMaybes . snd) . ) . mapAccumL step . flip (,) Nothing
              where
                step (c, Nothing) h | c' /= 0   = ((c', Nothing), Just h)
                                    | otherwise = ((c, Just h), Nothing)
                  where
                    c' = (c + h) `mod` p
                step (c, Just h') h | c' /= 0   = ((c', Nothing), Just h'')
                                    | otherwise = ((c, Just h''), Nothing)
                  where
                    h'' = h' + h :: Int
                    c' = (c + h'') `mod` p :: Int
    ps = VU.fromList . takeWhile (<= 1000000) $ primes :: VU.Vector Int
    l = VU.length ps :: Int
    is = VU.enumFromN 0 l :: VU.Vector Int
    tally :: [Int] -> VU.Vector Int
    tally = VU.accum (const . succ) (VU.replicate l 0) . concatMap (\x -> concatMap (\i -> bool [] [(i, ())] $ x `mod` (ps VU.! i) == 0) $ [0..(l - 1)])
  n <- unsafeTextToInt <$> T.getLine :: IO Int
  as <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  let
    bs = tally as :: VU.Vector Int
  putStrLn $ if VU.all (<= 1) bs then "pairwise coprime" else if VU.all (<= n) bs then "setwise coprime" else "not coprime"

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}


