N = int(input())
lis = list(map(int, input().split()))
import math
import functools
product = functools.reduce(lambda x, y : x*y, lis)
def gcm(a, b):
    return a // math.gcd(a, b) * b
ans = 1
res = lis[0]
for num in lis:
    ans = gcm(num, ans)
    res = math.gcd(res, num)
if ans == product:
    print("pairwise coprime")
elif res == 1:
    print("setwise coprime")
else:
    print("not coprime")
