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

from math import gcd
def lcm(a,b):
    return a*b//gcd(a,b)

pairprime_flag=True
allgcd=A[0]
product=1

for a in A:
    allgcd=gcd(allgcd,a)
    if gcd(product,a)!=1:
        pairprime_flag=False
    product=lcm(product,a)
if pairprime_flag:
    print('pairwise coprime')
elif allgcd==1:
    print('setwise coprime')
else:
    print('not coprime')
