import sys

def cf(x1,x2):
    cf=[]
    for i in range(2,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf

N = int(input())
A = list(map(int,input().split()))
A.sort()
X = cf(A[0],A[1])

for i in X:
    a = 0
    b = 0
    for j in range(N):
        if A[i] % i == 0:
            a += 1
        else:
            b += 1
    if a == N:
        print("not coprime")
        sys.exit()
    if a != 0 and b != 0:
        print("setwise coprime")
        sys.exit()
print("pairwise coprime" if len(X) == 0 else "setwise coprime")