import math
def yakusu(n):
    results = []
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            results.append(i)
            if i != (n // i):
                results.append(n // i)
    results += [n]
    return results
def eratos(A):
    max_Ai = 10**6
    isprime = [0 for i in range(max_Ai+1)]
    ans = []
    for ai in set(A):
        if ai == 1:
            ans += [1]
        elif isprime[ai] == 0:
            y = yakusu(ai)
            ans += [y[0]]
            for i in y:
                if isprime[i] == 0:
                    j = i + i
                    while j <= max_Ai:
                        if isprime[j] == 0:
                            isprime[j] = i
                        j = j + i
        else:
            ans += [isprime[ai]]

    return isprime, ans
N = int(input())
A = list(map(int, input().split()))
isprime, ans = eratos(A)
set_ans = set(ans)
if len(set_ans) == N:
    print('pairwise coprime')
elif len(set_ans) == 1:
    print('not coprime')
else:
    print('setwise coprime')

