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

from math import gcd
from functools import reduce

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

# nまでの素数リスト
def prime_list(n):
    primes = set(range(2, n + 1))
    for i in range(2, int(n ** 0.5) + 1):
        primes.difference_update(range(i * 2, n + 1, i))
    return list(primes)

g = gcd_list(A)
primes = prime_list(200)
cnt = [0] * 200

for a in A:
    for p in primes:
        if a % p == 0:
            cnt[p] += 1

ma = max(cnt)
    
if ma == 1:
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')