def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
    
import heapq

N=int(input())
A=list(map(int, input().split()))
heapq.heapify(A)

P=primes(1000000)
lP=len(P)
p_lis=[0]*lP

f_pair=True
f_set=True

for _ in range(N):
    a=heapq.heappop(A)
    
    for pi,p in enumerate(P):
        if a%p==0:
            a%=p
            p_lis[pi]+=1
            if p_lis[pi]==2:
                f_pair=False
            if p_lis[pi]==N:
                f_set=False
        if a==0:
            break
    if f_pair and f_set == False:
        break
#print(p_lis)

if f_pair:
    print('pairwise coprime')
elif f_set:
    print('setwise coprime')
else:
    print('not coprime')
    
"""
6 :[1,1,0,0,]
10:[1,0,1,0,]
15:[0,1,1,0,]

"""