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])
if len(X) != 0:
    for i in X:
        a = 0
        b = 0
        for j in range(N):
            if A[j] % i == 0:
                a += 1
            else:
                b += 1
        if a == N:
            print("not coprime")
            sys.exit()
        if b != 0:
            print("setwise coprime")
            sys.exit()
    print("setwise coprime")
else:
    for i in range(N-1):
        X = cf(A[i], A[i+1])
        if len(X) != 0:
            print("setwise coprime")
            sys.exit()
        else:
            for j in X:
                for k in range(N):
                    if A[k] % j == 0:
                        print("setwise coprime")
                        sys.exit()
    print("pairwise coprime")