import sys

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

a = max(A)
check = 0
for i in range(2,a) :
    B = list(map(lambda x : x%i , A))
    if B.count(0) == N :
        print("not coprime")
        sys.exit()
    elif B.count(0) >= 2 :
        check = 1

if check == 0 :
    print("pairwise coprime")
else :
    print("setwise coprime")

