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


def PrimeFactor(n):
    ret=set()
    for i in range(2,int(-(-n**0.5//1))+1):
        if i!=2 and i%2==0:
            continue
        cnt=0
        while n%i==0:
            cnt+=1
            n//=i
        if cnt!=0:
            ret.add(i)
    if n!=1:
        ret.add(n)
    return ret

AND = set(PrimeFactor(A[0]))
d = {}
ans = -1
fin = False
for a in A:
    l = PrimeFactor(a)
    AND = AND & set(l)
    for x in l:
        if x in d:
            if d[x] >= 1:
                ans = 2
        else:
            d[x] = 1



if len(AND) == 0 and ans == -1:
    print("pairwise coprime")
elif len(AND)==0:
    print("setwise coprime")
else:
    print("not coprime")