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

pc = True
gg = False
so = set()

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)
    if temp!=1:
        arr.append(temp)
    if arr==[]:
        arr.append(n)
    return arr

for a in factorization(A[0]):
    if a > 1:
        so.add(a)

for a in A[1:]:
    ds = []
    for s in so:
        if a%s != 0:
            ds.append(s)
        else:
            pc = False
    for d in ds:
        so.discard(d)

if pc:
    print("pairwise coprime")
elif not so:
    print("setwise coprime")
else:
    print("not coprime")