# -*- coding: utf-8 -*-
N = int(input())
A_list = list(map(int, input().split()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

gcd_set = set()
for i in range(N - 1):
    gcd_set.add(gcd(A_list[i], A_list[i + 1]))

if gcd_set == set([1]):
    print("pairwise coprime")
elif len(gcd_set) == N - 1:
    print("setwise coprime")
else:
    print("not coprime")