def gcd(a,b):
    if a%b==0:return(b)
    else:return(gcd(b,a%b))

def soinsuu_set(n):

    visited=set()
    for i in range(2,round(n**.5)+1):
        if n%i==0:
            visited.add(i)
        while n%i==0:
            n//=i
    if n>1:
        visited.add(n)
    return(visited)



N=int(input())

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

visited=set()
flg=False
for a in A:
    for i in soinsuu_set(a):
        if i in visited:
            flg=True
            break
        else:
            visited.add(i)

    if flg:
        break
else:
    print("pairwise coprime")
    exit()

visited=soinsuu_set(A[0])
for a in A[1:]:
    for i in soinsuu_set(a):
        if i in visited:
            visited.remove(i)
if visited:
    print("not coprime")
else:
    print("setwise coprime")
