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

if setGcd != 1:
    setwise = 0

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