n = int(input())
a = list(map(int,input().split()))
l = [0 for _ in range(10**6+2)]
def fac(n):
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            l[i] += 1
    if temp!=1:
        l[temp] += 1

for i in range(n):
    fac(a[i])
bit = 0
for i in l:
    if i==n:
        print("not coprime")
        exit()
    if i!=0 and i!=1:
        bit =1 

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