from math import sqrt
from collections import Counter
import sys
import numpy as np

def factorize(n):
    rt = int(sqrt(n)+1)
    facts = []
    for i in range(2, rt+1):
        if n % i == 0:
            facts.append(i)
            while n % i == 0:
                n //= i
    if n != 1:
        facts.append(n)
    return facts

def sieve(n):
    S = [True] * (n+1)
    S[0] = S[1] = False
    i = 2
    while i * i <= n:
        if S[i]:
            k = i * i
            while k <= n:
                S[k] = False
                k += i
        i += 1
    return S


n = int(input())
A = list(map(int, input().split()))
amax = max(A)
primes= np.arange(amax+1)[sieve(amax)]


facts = {}
for a in A:
    rt = int(sqrt(a)+1)
    for p in primes:
        if p > rt: break
        if a % p == 0:
            if facts.get(p) is None:
                facts[p] = 1
            else:
                facts[p] += 1

p_max = max(facts.values()) if facts  else 1
if  p_max == 1:
    print('pairwise coprime')
elif  p_max <  n:
    print('setwise coprime')
else:
    print('not coprime')