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

if len(A) == len(setA):
    #pairwiseかどうかを調べる
    memo = [1]*(10**6+1)
    memo[0] = 0
    memo[1] = 0
    for i in range(2,10**6+1):
        if memo[i] == 1:
            flag = False
            if i in setA:
                flag = True
            for j in range(i*2,10**6+1,i):
                if j in setA:
                    if flag:
                        break
                    else:
                        flag = True
                memo[j] = 0
            else:
                continue
            break
    else:
        print("pairwise coprime")
        exit()



#setwise coprimeを判断
def gcd(a,b):
    return a if b==0 else gcd(b,a%b)

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