def factorization(n):
    arr = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.add(i)

    if temp!=1:
        arr.add(temp)

    if arr=={}:
        arr.add(n)

    return arr

N = int(input())
A = [factorization(int(n)) for n in input().split()]
#print(A)
ans = dict()
isPairwise = True

for st in A:
    for num in st:
        if num in ans.keys():
            ans[num] += 1
            isPairwise = False
        else:
            ans[num] = 1
#print(ans)
if isPairwise:
    print("pairwise coprime")
elif any([ans[n] >= N for n in ans.keys()]):
    print("not coprime")
else:
    print("set coprime")