import math
N = int(input())
A = [int(x) for x in input().split()]
P = [2]
for L in range(3, math.ceil(math.sqrt(max(A))), 2): 
    if all(L % L2 != 0 for L2 in P):  
        P.append(L)
lst = [0] * len(P)
for i, p in enumerate(P):
    cnt = 0
    for a in A:
        cnt += a % p == 0
    lst[i] = cnt
tmp = max(lst)
if tmp == 1:
    print('pairwise coprime')
elif tmp == N:
    print('not coprime')
else:
    print('setwise coprime')
