n = int(input())
a = list(map(int, input().split()))
b = a.copy()
from math import gcd

def sieve(n):
    prime = []
    is_prime = [True]*(n+1)
    is_prime[0] = is_prime[1] = False
    for i in range(n+1):
        if is_prime[i]:
            prime.append(i)
            for j in range(i*2, n+1, i):
                is_prime[j] = False
                
    return prime

primes = sieve(1000)
flg = True
for x in primes:
    tmp = 0
    for i in range(n):
        if a[i] % x == 0:
            tmp += 1
        while a[i] % x == 0:
            a[i] //= x
    if tmp > 1:
        flg = False

from collections import Counter
cnt = Counter(a)
for x, c in cnt.items():
    if x != 1 and c > 1:
        flg = False

if flg:
    print('pairwise coprime')
else:
    tmp = b[0]
    for i in range(1, n):
        tmp = gcd(tmp, b[i])
    if tmp == 1:
        print('setwise coprime')
    else:
        print('not coprime')