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

N = int(input())
A = list(map(int, input().split()))
count = [0 for i in range(10**6+1)]
for ai in A:
    for y in yakusu(ai):
        count[y] += 1
max_c = max(count)
if max_c == 1:
    print('pairwise coprime')
elif max_c == N:
    print('not coprime')
else:
    print('setwise coprime')

