N = int(input())
lis = list(map(int, input().split()))
def fun(lis):
    import math
    import functools
    product = functools.reduce(lambda x, y : x*y, lis)
    @functools.lru_cache(None)
    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 res == 1:
            return "setwise coprime"
    if ans == product:
        return "pairwise coprime"
    else:
        return "not coprime"
print(fun(lis))
