import math
from functools import reduce

n = int(input())
a_list = list(map(int, input().split()))

for i in range(n):
    for j in range(i + 1, n):
        if math.gcd(a_list[i], a_list[j]) != 1:
            if reduce(math.gcd, a_list) == 1:
                print("setwise coprime")
                exit()
            else:
                print("not coprime")
                exit()

print("pairwise coprime")
