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

if count == n * (n-1) / 2:
    print("pairwise coprime")
elif reduce(math.gcd, num_list) == 1:
    print("setwise coprime")
else:
    print("not coprime")
