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]*1000
# print(p)
n = int(input())
a = list(map(int,input().split()))
g = 0
f = 1
for i in a:
    g = gcd(g,i)
    for j in p:
        if i%j == 0:
            c[j] += 1
if max(c) > 1:
    f = 0
if len(set(a)) != n:
    f = 0
# print(g,f)
if g == 1:
    if f == 1:
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    print("not coprime")