from math import gcd
from functools import reduce
N = int(input())
*A, = map(int, input().split())


MAX_N = 1000_000

primes = [1]*(MAX_N+1)
primes[1] = 1
for i in range(2, int(MAX_N**0.5)+1):
    if primes[i] > 1:
        continue
    for j in range(i, MAX_N+1, i):
        primes[j] = i

gcd_set = reduce(gcd, A)


b = {}

def prime_fact(n):
    ret = {}
    while n > 1:
        p = primes[n]
        if p in ret:
            ret[p] += 1
        else:
            ret[p] = 1
        n //= p


    for p in ret.keys():
        if p in b:
            return False
        else:
            b[p] = 1
    return True

for a in A:
    if not prime_fact(a):
        if gcd_set == 1:
            print('setwise coprime')
        else:
            print('not coprime')
        exit()

print('pairwise coprime')   


