import math

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

cnt = 0
for i in range(0,N-1):
    for j in range(i+1,N):
        if math.gcd(A[i], A[j]) != 1:
            cnt += 1
            break
    else:
        continue
    break


if cnt == 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')
