import numpy as np

n = int(input())
arr = np.array(list(map(int, input().split())))


n = 10**3 + 1
primes = set(range(3, n+1, 2))

for i in range(3, int(n**0.5+1)):
    primes.difference_update(range(i*2, n+1, i))
primes.add(2)

used = [False] * 1002
ans1 = True
flg = False
for x in arr:
    for p in primes:
        while x % p == 0:
            if used[p] == True:
                ans1 = False
                flg = True
                break
            x //= p
            used[p] = True
        if flg:
            break
    if flg:
        break


ans2 = np.gcd.reduce(arr) == 1

if ans1 and ans2:
    print("pairwise coprime")
elif ans2:
    print("setwise coprime")
else:
    print("not coprime")