prime = []

for i in range(2,1001):
    det = 0
    for j in range(2,int(i**(1/2))+1):
        if i%j==0:
            det = -1
            break
    if det == 0:
        prime.append(i)

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

m = 1

for p in prime:
    count = 0
    for i in range(N):
        if A[i]%p==0:
            count += 1
    m = max(m,count)

if m == 1:
    print('pairwise coprime')
elif m < N:
    print('setwise coprime')
else:
    print('not coprime')
