import math

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

if sum(1 for i in range(0,N-1) for j in range(i+1,N) if math.gcd(A[i], A[j]) != 1) == 0:
    print('pairwise coprime')
    exit()

ans = A[0]
for i in range(1, N):
    ans = math.gcd(ans, A[i])

if ans == 1:
    print('setwise coprime')
    exit()

print('not coprime')
