from math import gcd
def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
p = primes(1000)
c = [0]*1001
# print(len(p))

n = int(input())
if n>80000:
    print("not coprime")
    exit()
a = list(map(int,input().split()))
g = 0
f = 1
c1 = 0
for i in a:
    g = gcd(g,i)
    if i == 1:
        c1 += 1
    if f == 1:
        for j in p:
            if i%j == 0:
                c[j] += 1
                if c[j] > 1:
                    f = 0
# print(c1)
if len(set(a))+max(0,c1-1) != n:
    f = 0
# print(g,f)
if g == 1:
    if f == 1:
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    print("not coprime")