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

import itertools
import fractions

ans_list = 1
not_pair = False
not_set = False

for combi in itertools.combinations(A, 2):
    ans = fractions.gcd(combi[0], combi[1])
    if ans != 1:
        not_pair = True
        if ans_list == 1:
            ans_list = ans
        else:
            ans_list = fractions.gcd(ans, ans_list)
            if ans_list != 1:
                not_set = True
                break

if not not_pair:
    print("pairwise coprime")
elif not not_set:
    print("setwise coprime")
else:
    print("not coprime")