import math
N=int(input())
A=[int(x) for x in input().split()]
gcd=A[0]
for i in range(1,N):
    gcd=math.gcd(gcd,A[i])
if gcd!=1:
    print("not coprime")
else:
    flag=1
    maxA=max(A)
    primeset=set()
    primeset.add(2)
    for h in range(3,maxA+1):
        flag=1
        for k in primeset:
            if h%k==0:
                flag=0
                break
        if flag==1:
            primeset.add(h)
    already_prime=set()
    for j in range(N):
        now=A[j]
        for k in primeset:
            if now%k==0:
                if k in already_prime:
                    flag=0
                    break
                else:
                    already_prime.add(k)

    if flag==1:
        print("pairwise coprime")
    else:
        print("setwise coprime")