def divisor(n):
    L = []
    for i in range(1,int(n**0.5)+1):

        if n%i == 0:
            L.append(i)
            L.append(n//i)
        if 1 in L:
            L.remove(1)
    return L


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

from math import gcd
from  functools import reduce

flag = False
s = set()
for i in range(n):
    li = divisor(LL[i])
    li = list(set(li))

    for j in range(len(li)):
        if li[j] not in s:
            s.add(li[j])
        else:
            flag = True
            break

a = reduce(gcd,LL)


if not flag and a ==1:
    print("pairwise coprime")
elif  flag and a == 1:
    print("setwise coprime") 
else:
    print("not coprime")