from math import gcd
n = int(input())
a = list(map(int, input().split()))

PAIR_WISE = "pairwise coprime"
SET_WISE = "setwise coprime"
NOT = "not coprime"

def get_primes(n):
    data = [i for i in range(2, n + 1)]
    for d in data:
        data = [x for x in data if (x == d or x % d != 0)]
    return data

is_pair = True
is_set = True

primes = get_primes(1000)
p_map = {i:False for i in primes}
set_gcd = a[0]
for i in a:

    if is_pair:
        for p in primes:
            if i % p == 0:
                if p_map[p]:
                    is_pair = False
                else:
                    p_map[p] = True
    set_gcd = gcd(i, set_gcd)

is_set = set_gcd == 1
if is_pair:
    print(PAIR_WISE)
    exit()
if is_set:
    print(SET_WISE)
    exit()
print(NOT)



