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

    if arr==[]:
        arr.append(n)

    return arr

base=A[0]
condition=0
check=0
for i in range(1,len(A),1):
    arr=factorization(A[i])
    for a in arr:
        if base%a==0:
            check=1
    base*=A[i]
    if check==1:
        condition=1
        break

if condition!=0 and i==1:
    base=A[0]
    for j in range(i,len(A),1):
        base=gcd(base,A[j])
    if base!=1:
        condition=2
ans=["pairwise coprime","setwise coprime","not coprime"]
print(ans[condition])
