import sys
import math

def prime(n):
    D = [i for i in range(n+1)]
    for i in range(2, n+1):
        if i != D[i]:
            break
        j = 2
        while j * i <= n:
            if D[j * i] == j * i:
                D[j * i] = D[i]
            j += 1
    return D

def prime2(A):
    ans = A[0]
    for i in range(1,n):
        ans = math.gcd(ans, A[i])
    return ans

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

m = max(A)
if m == 1:
    print('pairwise coprime')
    sys.exit()

D = prime(m)

dic = {}

for i in range(n):
    if D[A[i]] not in dic:
        dic[D[A[i]]] = 1
    else:
        dic[D[A[i]]] += 1
#print(dic)
if n == len(dic) and (1 not in dic):
    print('pairwise coprime')
elif prime2(A) == 1:
    print('setwise coprime')
else:
    #print(prime2(A))
    print('not coprime')
