N = int(input())
A = list(map(int, input().split()))

import itertools
import math

ans_list = []
not_pair = False
for combi in itertools.combinations(A, 2):
    ans = math.gcd(combi[0], combi[1])
    if ans != 1:
        ans_list.append(ans)
        not_pair = True

if not not_pair:
    print("pairwise coprime")
else:
    ans = ans_list[0]
    not_set = False
    for i in range(1, N):
        ans = math.gcd(ans, ans_list[i])
        if ans != 1:
            print("not coprime")
            not_set = True
            break
    if not not_set:
        print("setwise coprime")
