import math

n = int(input())
a = list(map(int, input().split()))

pairwise_flag = True
total_set = set()
common_set = set()
i_max = max(a)
num_list = [i for i in range(2, i_max + 1)]
prime_list = set(num_list)
for i in num_list:
    if i in prime_list:
        tmp = i + i
        while tmp < i_max:
            tmp += i
            prime_list.discard(tmp)

total_gcd = a[0]
for i in range(1, n):
    total_gcd = math.gcd(total_gcd, a[i])

for i in range(n):
    tmp = a[i]
    tmp_list = []
    for j in prime_list:
        if tmp < j:
            break
        if tmp % j == 0:
            while tmp % j == 0:
                tmp //= j
            tmp_list.append(j)
    for j in tmp_list:
        prime_list.discard(j)
    if tmp != 1:
        pairwise_flag = False
        break

if pairwise_flag:
    print("pairwise coprime")
elif total_gcd > 1:
    print("not coprime")
else:
    print("setwise coprime")