n=int(input())
a=list(map(int,input().split()))
arr = [0]*(10**6+1)
def factorization(n):
    temp = n
    flag=0
    a=[]
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            flag=1
            while temp%i==0:
                temp //= i
            a.append(i)
    if flag==0:
        a.append(n)
    return a


f=False
for num in a:
    for s in factorization(num):
        arr[s]+=1
ans=max(arr)
if ans==n:
    print("not coprime")
elif ans>=2:
    print("setwise coprime")
else:
    print("pairwise coprime")

