import math

def linked_merge_sort(l): #マージソート
    if len(l) == 1:
        return
    q, r = divmod(len(l), 2)
    left = [l.pop() for _ in range(q)]
    right = [l.pop() for _ in range(q + r)]
    
    linked_merge_sort(left)
    linked_merge_sort(right)
    
    left.reverse()
    right.reverse()
    while left and right:
        if left[-1] <= right[-1]:
            l.append(left.pop())
        else:
            l.append(right.pop())
    while left:
        l.append(left.pop())
    while right:
        l.append(right.pop())
    return

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

linked_merge_sort(a)

gx=list()
if (n-1)%2==0:
    npt=(n*(n-1))//2
else:
    npt=(((n+1)*n)//2)-n

for i in range(n):
    j=1
    while i+j<n:
        if math.gcd(a[i],a[i+j])!=1:
            gx.append(math.gcd(a[i],a[i+j]))
        j+=1

y=gx[0]
jud=1

for i in gx:
    if i !=y:
        jud=0
        break

if len(gx)==0:
    print("pairwise coprime")
elif len(gx)==npt and jud==0:
    print("setwise coprime")
else:
    print("not coprime")
