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


def get_sieve_of_eratosthenes(n):
    prime = []
    limit = 1000
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

data=get_sieve_of_eratosthenes(1000000)
def prime_factorization(n):
    arr=[]
    for p in data:
        if p >n:
            break
        if n%p==0:
            arr.append(p)
        
    return arr

isPairwise = True
isSetwise = True
dict=defaultdict(lambda:0)

for i in range(N):
    test=A[i]
    for p in data:
        if p>A[i]:
            break
        if test%p==0:
            dict[p]+=1

for i in dict.values():
    if i==N:
        isPairwise=False
        isSetwise=False
    elif i>1:
        isPairwise=False
    else:
        pass

if isPairwise:
    print('pairwise coprime')
elif isSetwise:
    print('setwise coprime')
else:
    print('not coprime')
    
