import math
def factorization(n):
    arr = []
    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.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr


N=int(input())
A=list(map(int,input().split()))
a=A[0]
for i in range(1,N):
    a=math.gcd(a,A[i])
if N>=78500 and a==1:
    print("setwise coprime")
elif N>=78500 and a>1:
    print("not coprime")
else:
    flag=True
    num_list=[0 for i in range(10000000)]
    for i in range(N):
        list_=factorization(A[i])
        for b,d in list_:
            if num_list[b]!=0:
                flag=False
            else:
                num_list[b]+=1
    if flag==True and a==1:
        print("pairwise coprime")
    elif flag==False and a==1:
        print("setwise coprime")
    else:
        print("not coprime")