from collections import Counter
N = int(input())
A = list(map(int,input().split()))

primes = []
def primeFinder(n):
    memo = [1]*(n+1)
    memo[0] = 0
    memo[1] = 0
    for i in range(2,n+1):
        if memo[i] == 1:
            primes.append(i)
            for j in range(i*2,n+1,i):
                memo[j] = 0

primeFinder(10**6)
primeNums = primes
"""
各Aiに関して素因数を算出。素因数を集計してカウントが2つある素因数がなければpairwise
"""
count = Counter([])
for i in range(N):
    tmp = []
    a = A[i]
    i = 0
    while a != 1:
        d = primeNums[i]
        if a % d == 0:
            tmp.append(d)
        while a % d == 0:
            a //= d
        i += 1
    count += Counter(tmp)

for v in count.values():
    if v >= 2:
        break
else:
    print("pairwise coprime")
    exit()

def gcd(a,b):
    return a if b==0 else gcd(b,a%b)

#setwise coprimeを判断
g = A[0]
for i in range(1,N):
    g = gcd(g,A[i])
if g == 1:
    print("setwise coprime")
else:
    print("not coprime")
