from math import gcd
N = int(input())
A = list(map(int,input().split()))

g = 0
for a in A:
    g = gcd(g,a)
if g > 1:
    print('not coprime')
    exit()

MAXN = 10**6+10
sieve = [0,0] + [1]*MAXN
p = 2
primes = set()
while p*p <= MAXN:
    if sieve[p]:
        primes.add(p)
        for q in range(2*p,MAXN+1,p):
            sieve[q] = 0
    p += 1
for i in range(p,MAXN+1):
    if sieve[i]:
        primes.add(i)

for a in A:
    dels = set()
    for p in primes:
        if p > a: continue
        while a%p==0:
            a //= p
            dels.add(p)
    if a > 1:
        print('setwise coprime')
        exit()
    for p in dels:
        primes.remove(p)
print('pairwise coprime')