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)


N = int(input())
adict = {}
for a in map(int, input().split()):
    f = True
    for p in primes:
        if a % p == 0:
            adict[p] = adict.setdefault(p, 0) + 1
            f = False
    if f:
        adict[a] = adict.setdefault(a, 0) + 1

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