import math
def eratos(n):
    isprime = [[] for i in range(n+1)]
    # isprime[0] = 0
    isprime[1] = 1
    for i in range(2, int(math.sqrt(n))+1):
        if isprime[i] == []:
            j = i
        while j <= n:
            isprime[j] += [i]
            j = j + i
    return isprime

N = int(input())
A = list(map(int, input().split()))
isprime = eratos(10**6)
count = [0 for i in range(10**6+1)]

count[1] = 1
for ai in A:
    if ai == 1:
        continue
    for i in isprime[ai]:
        count[i] += 1
max_c = max(count)
if max_c == 1:
    print('pairwise coprime')
elif max_c == N:
    print('not coprime')
else:
    print('setwise coprime')