def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n //= i
            table.append(i)
        i += 1
    if n > 1: table.append(n)
    return set(table)

n = int(input())
a = list(map(int, input().split()))
d = [0] * (10**6+1)
for i in range(n):
    for j in prime_decomposition(a[i]):
        d[j] += 1
        
max_ = max(d)
if max_ == 1:
    print('pairwise coprime')
elif max_ != n:
    print('setwise coprime')
else:
    print('not coprime')