p = 1000003

def gcd(a, b):
    a, b = sorted([a, b], reverse=True)
    if b == 0:
        return a
    else:
        r = a % b
        ans = gcd(b, r)
        return ans

def modpow(a, n, p):
    if n == 1:
        ans = a % p
    else:
        if n % 2 == 0:
            ans = (modpow(a, n // 2, p) ** 2) % p
        else: # n % 2 == 1
            ans = (a * (modpow(a, n // 2, p) ** 2)) % p

    return ans

N = int(input())
A = sorted([int(x) for x in input().split()])

pw, sw = False, False
d, l, P = 0, 1, 1
for i in range(N):
    d = gcd(A[i], d)
    P = P * A[i] % p
    l = P * modpow(gcd(A[i], l), p - 2, p) % p

if d == 1:
    sw = True
    if P == l:
        pw = True
            
if sw:
    if pw:
        print('pairwise coprime')
    else:
        print('setwise coprime')
else:
    print('not coprime')