import math

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

f = 0

for i in range(len(A) - 1):
    for j in range(i+1,len(A)):
        if math.gcd(A[i],A[j]) != 1:
            f = 1
if f == 0:
    print("pairwise coprime")

else:
    a = A[0]
    for i in range(1,len(A)):
        a = math.gcd(a,A[i])

    if a == 1:
        print("setwise coprime")
    else:
        print("not coprime")
