def sieve(n):
    is_prime = [True for _ in range(n)]
    is_prime[0] = False

    for i in range(2, n + 1):
        if is_prime[i - 1]:
            j = i
            f = 0
            while j <= n:
                if f and j in b:
                    return False
                if j in b:
                    f = True
                is_prime[j - 1] = False
                j += i
    return True


from math import gcd
from functools import reduce


def gcd_list(numbers):
    return reduce(gcd, numbers)


n = int(input())
a = list(map(int, input().split()))
b = set(a)
if sieve(10 ** 6):
    print("pairwise coprime")
elif gcd_list(a) == 1:
    print("setwise coprime")
else:
    print("not coprime")
