import math

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

D = [i for i in range(1000001)]

for i in range(2,1001):
    if D[i] == i:
        for j in range(2,1+100000//i):
            D[i*j] = i

###
#print(D[:10])
###

det = True
P = []

for a in A:
    Q = []
    aa = a
    while aa > 1:
        Q.append(D[aa])
        aa //= D[aa]
    P = P + list(set(Q))
    ###
    #print(P)
    #print(Q)
    ###
    if len(P) != len(set(P)):
        det = False
        break
    P = set(P)

if det:
    print('pairwise coprime')

else:
    g = A[0]
    for i in range(1,N):
        g = math.gcd(g,A[i])
    if g == 1:
        print('setwise coprime')
    else:
        print('not coprime')