def generate_primes(n):
    p = 2
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    return prime

prime = [True for i in range(10**6 + 1)]
generate_primes(10**6)
primenumbers = [ind for ind,val in enumerate(prime[2:],2) if val]
n = int(input())
ls = list(map(int,input().strip().split()))
maxi = max(ls)
flag = 0
ans = "pairwise coprime"
for prime_no in primenumbers:
    if prime_no>maxi: break
    f = 1
    c = 0
    for val in ls:
        if val%prime_no!=0:
            f = 0
        else:
            c += 1
        if f==0 and c>1: break
    if f:
        ans = "not coprime"
        break
    if c>1:
        flag = 1
if flag:
    ans = "setwise coprime"
print(ans)
