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

MAX_N = max(A)+5
primes = list(range(MAX_N+1))
for i in range(2, int(MAX_N**0.5)+1):
    if primes[i] < i:
        continue
    for j in range(2*i, MAX_N+1, i):
        primes[j] = i

def check():
    S = set()
    for a in A:
        T = set()
        while True:
            p = primes[a]
            if p in S:
                return False
            T.add(p)
            if p == a:
                break
            a //= p
        S |= T
    return True

if check():
    print('pairwise coprime')
elif reduce(gcd, A) == 1:
    print('setwise coprime')
else:
    print('not coprime')
