import numpy as np
from numba import njit


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


n = 10**3
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)


@njit
def solve(arr, primes):
    used = [False] * 1000
    ans = True
    for x in arr:
        for p in primes:
            while x % p == 0:
                if used[p]:
                    ans = False
                    return ans
                while x % p == 0:
                    x //= p
                used[p] = True
    return ans


ans1 = solve(arr, primes)
ans2 = np.gcd.reduce(arr) == 1

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