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

pairwise_flag=True
total_set=set()
common_set=set()
i_set = [set() for i in range(n)]

for i in range(n):
    tmp = a[i]
    for j in range(2,a[i]//2+1):
        if tmp%j ==0:
            while tmp%j==0:
                tmp//=j
            i_set[i].add(j)
            if pairwise_flag:
                if j in total_set:
                    pairwise_flag=False
    total_set = total_set.union(i_set[i])
    if i==0:
        common_set=i_set[i]
    else:
        common_set=common_set.intersection(i_set[i])

if pairwise_flag:
    print("pairwise coprime")
elif common_set:
    print("not coprime")
else:
    print("setwise coprime")