from math import gcd

def factorization(n):
    temp = n
    f=0
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            f=1
            yak[i]+=1

    if temp!=1:
        f=1
        yak[temp]+=1

    if  f==0:
        yak[n]+=1

    return

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

c=max(A)
yak=[0]*(c+1)

for i in A:
    c=gcd(c,i)
    factorization(i)

if max(yak)==1:
    print('pairwise coprime')

elif c==1:
    print('setwise coprime')

else:
    print('not coprime')