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

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

isPairWise = True
tmp = A[0]
for i in range(1, N):
    gcd = math.gcd(tmp, A[i])
    tmp *= A[i]
    if gcd != 1:
        isPairWise = False

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

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

print("not coprime")
