from math import gcd

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

setgcd = A[0]
for i in range(N):
    setgcd = gcd(setgcd,A[i])
is_set = True
if setgcd != 1:
    is_set=False

M = max(A)
is_prime=[1]*(M+1)#Mまで行きたい
is_inA=[0]*(M+1)
for i in range(N):
    is_inA[A[i]]=1

is_pair = True
is_prime[0]=0
is_prime[1]=0
for i in range(2,M+1):
    count = 0
    if is_inA[i]==1:
        count=1
    if is_prime[i]==1:
        for j in range(2*i,M+1,i):
            is_prime[j]=0
            if is_inA[j]==1:
                count+=1
    if count >= 2:
        is_pair = False

if is_pair:
    print("pairwise coprime")
elif is_set:
    print("setwise coprime")
else:
    print("not coprime")