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):
    cnt = 0
    for j in range(i+1,N):
        if A[i] > A[j+cnt]:
            cnt += 1
            continue
        setGcd = math.gcd(setGcd, A[j+cnt])
        holdGcd = math.gcd(A[i], A[j+cnt])
        # print(A[i], A[j+cnt], holdGcd, setGcd)
        if holdGcd != 1:
            pairwise = 0

if setGcd != 1:
    setwise = 0

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