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 = []
while p*p <= MAXN:
    if sieve[p]:
        primes.append(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.append(i)

from collections import Counter
ctr = Counter(A)
if ctr.most_common()[0][1] > 1:
    print('setwise coprime')
    exit()

for p in primes:
    if p > 1000: break
    c = 0
    for a in A:
        if a%p==0:
            c += 1
            if c > 1:
                print('setwise coprime')
                exit()

print('pairwise coprime')