import math
N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
holdGcd = math.gcd(A[0], A[1])
pairwise = 1
setwise = 1
for i in range(N):
    cnt = 1
    for j in range(i+1,N):
        if A[i] > A[i+cnt]:
            continue
        holdGcd = math.gcd(holdGcd, A[i+cnt])
        break
    if holdGcd != 1:
        pairwise = 0

if holdGcd != 1:
    setwise = 0

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