from collections import Counter
primes = []
flag = [True for i in range(10**3 + 1)]
for i in range(2, 10**3 + 1):
    if flag[i]:
        for j in range(2, 10**3 + 1):
            if i * j > 10**3:
                break
            flag[i * j] = False
        primes.append(i)

# print(primes)
N = int(input())
alist = []
for a in map(int, input().split()):
    f = True
    for p in primes:
        if p > a**(1 / 2):
            alist.append(a)
            f = False
            break
        if a % p == 0:
            alist.append(p)
            f = False
            break
    if f:
        alist.append(a)

count = Counter(Counter(alist).values())
_max = max(count)
if _max == 1:
    print("pairwise coprime")
elif _max == N:
    print("not coprime")
else:
    print("setwise coprime")