from math import gcd
from functools import reduce

M = 10 ** 6
ret = [0] * M
n = int(input())
nums = list(map(int, input().split()))
flag = 1
for i in nums:
    ret[i] += 1
for i in range(2, M):
    if sum(ret[i::i]) > 1:
        flag = 0
        break
if flag:
    print("pairwise coprime")
elif reduce(gcd, nums) == 1:
    print("setwise coprime")
else:
    print("not coprime")