from math import gcd


def prime_factorize(n):
    a=set()
    while n%2==0:
        a.add(2)
        n //=2
    f=3
    while f**2<=n:
        if n%f==0:
            a.add(f)
            n //=f
        else:f +=2
    if n!=1:a.add(n)
    return a


n=int(input())
A=list(map(int,input().split()))
prime=[True for _ in range(10**6+1)]

flag=0
for i in A:
    for j in prime_factorize(i):
        if prime[j]:
            for k in range(j,10**6+1,j):
                prime[k]=False
        else:
            flag=1
            break
if flag==0:print("pairwise coprime");exit()
line=[0]*n
line[0]=A[0]
for i in range(1,n):
    line[i]=gcd(line[i-1],A[i])
if line[-1]==1:print("setwise coprime");exit()
print("not coprime")
