import math
def eratos(n):
    isprime = [0 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] == 0:
            j = i
        while j <= n:
            if isprime[j] == 0:
                isprime[j] = i
            j = j + i
    return isprime        

N = int(input())
A = list(map(int, input().split()))
isprime = eratos(10**6)
one_count = 0
ans = []
for ai in A:
    if ai == 1:
        one_count += 1
        continue
    ans += [isprime[ai]]
set_ans = set(ans)
# print(set_ans)
if len(set_ans) == (N - one_count):
    print('pairwise coprime')
elif len(set_ans) == 1 and one_count == 0:
    print('not coprime')
else:
    print('setwise coprime')