from math import gcd
N = int(input())
A = list(map(int, input().split()))
max_A = max(A)
happend_numbers = [False]*(max_A+1)  # 0~NのN+1個
for a in A:
    happend_numbers[a] = True

for i in range(2, max_A+1):
    true_count = 0
    for j in range(i, max_A+1, i):
        if happend_numbers[j]:
            true_count += 1
    if true_count >= 2:
        break
else:
    print("pairwise coprime")
    exit()

now = A[0]
for a in A[1:]:
    now = gcd(a, now)
if now == 1:
    print("setwise coprime")
    exit()
print("not coprime")
