from collections import Counter

def gcd(a,b):
    if a%b==0: return b
    return gcd(b,a%b)

n=int(input())
a=list(map(int,input().split()))

m=10**6+4
d=[0]*m

dic=Counter(a)
for i,val in dic.items(): d[i]=val
flag2=0
for i in range(2,max(a)):
    flag=0
    for j in range(i,m,i):
        if d[j] and flag:
            flag2=1
            break
        elif d[j]: flag=1

s=a[0]
for i in a:
    s=gcd(s,i)
    
if not flag2: print("pairwise coprime")
elif s==1: print("setwise coprime")
else: print("not coprime")