import math

n = int(input())
a = list(map(int, input().split()))

def gen_primes(limit):
    prime_table = [True] * (limit + 1)
    prime_table[0] = False
    prime_table[1] = False
    for i in range(2, int(limit**.5)+1):
        prime_table[i+i::i] = [False] * (limit//i-1)
    return prime_table

primes = gen_primes(int((10**6)**.5))
factors = []
gcd = a[0]
for A in a:
    for i,p in enumerate(primes[2:], 2):
        if p and A%i == 0:
            factors.append(i)
            break
    else:
        factors.append(A)
    gcd = math.gcd(gcd, A)

if len(factors) == len(set(factors)):
    print('pairwise coprime')
elif gcd == 1:
    print('setwise coprime')
else:
    print('not coprime')