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

isSetWise = False
gcd = A[0]
if A[0] == 1:
    print("not coprime")
    exit()
for i in range(1, N):
    if A[i] == 1:
        print("not coprime")
        exit()
    gcd = math.gcd(gcd, A[i])
if gcd == 1:
    isSetWise = True

isPairWise = True
for i in range(N-1):
    if math.gcd(A[i], A[i+1]) != 1:
        isPairWise = False
        break

if isPairWise:
    print("pairwise coprime")
    exit()

if isSetWise:
    print("setwise coprime")
    exit()

print("not coprime")
