def get_primes(n):
    max_p = int(n ** 0.5)
    p = 0 # 素数
    pl = []  # 素数リスト
    el = [i for i in range(2, n + 1)]  # 探索リスト
    while p <= max_p:
        nxt = []
        p = el[0]
        pl.append(p)
        for e in el:
            if e % p == 0:
                # D[e] = p
                pass
            else:
                nxt.append(e)
        el = nxt
    return pl


N = int(input())
a = list(map(int, input().split()))

is_pc = True
is_sc = True

p_list = get_primes(N)
for p in p_list:
    t = [int(x % p == 0) for x in a]
    s = sum(t)
    if s >= 2:
        is_pc = False
    if s == N:
        is_sc = False
        break
if is_pc:
    print('pairwise coprime')
elif is_sc:
    print('setwise coprime')
else:
    print('not coprime')