import math
import copy
from functools import reduce

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

for i in range(2, a_list[n - 2] + 1):
    damy = copy.deepcopy(a_list)
    damy = list(map(lambda x: x % i, damy))
    damy.sort()
    if damy[0] == 0 and damy[1] == 0:
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()
print("pairwise coprime")
