n = int(input())
A = tuple(map(int, input().split()))
def p(n):
    is_prime = [True if i%2 == 1 else False for i in range(0, n+1) ]
    is_prime[0] = False
    is_prime[1] = False
    is_prime[2] = True # 2は素数
    # 3からの奇数について
    for i in range(3, int(n**0.5) + 1, 2):
        # 既に素数の倍数であればスキップ
        if not is_prime[i]:
            continue
        # iの倍数は素数ではないとする
        for j in range(i*2, n+1, i):
            is_prime[j] = False
    return [i for i in range(n+1) if is_prime[i]]

primes = p(max(A))

fact_counts = dict()
for a in A:
    for p in primes:
        if a%p == 0:
            fact_counts.setdefault(p, 0)
            fact_counts[p] += 1

pairwise = True
for c in fact_counts.values():
    if c > 1:
        pairwise = False
        break

if pairwise:
    print('pairwise coprime')
else:
    if max(fact_counts.values()) == n:
        print('not coprime')
    else:
        print('setwise coprime')
