from collections import defaultdict
N = int(input())
a = list(map(int, input().split()))

am = max(a)

memo = [1] * (am+1)
memo[0] = 0
memo[1] = 0

p = -1
g = a[0]
d = defaultdict(int)

for ai in range(2, am+1):
    if ai == p:
        memo[ai] = 0
        continue
    for j in range(2, am // ai + 1):
        memo[ai * j] = 0
    p = ai

cs = []
for i, memoi in enumerate(memo):
    if memoi:
        cs.append(i)

# print(cs)

def make_divisors(n):
    divisors = []
    lim = int(n**0.5)+1
    for i in cs:
        if i >= lim:
            break
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

f1 = 1 

for ai in a:
    for div in make_divisors(ai):
        if div != 1:
            d[div] += 1
            if d[div] > 1:
                f1 = 0
                break

if f1:
    print('pairwise coprime')
else:
    f2 = 1
    for key in d:
        if d[key] == N:
            f2 = 0
            break
    if f2:
        print('setwise coprime')
    else:
        print('not coprime')
