import math
from functools import reduce
n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

# for i in range(n-1):
#     for j in range(i+1,n):
#         if math.gcd(num_list[i],num_list[j]) == 1:
#             count += 1
#         else:
#             break

# if count == n * (n-1) / 2:
#     print("pairwise coprime")

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

if reduce(lcm_base, num_list, 1):
    print("pairwise coprime")
elif reduce(math.gcd, num_list) == 1:
    print("setwise coprime")
else:
    print("not coprime")
