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

import math
G = A[0]

for i in range (0, N):
	G = math.gcd(G, A[i])  

if G > 1:
	print('not coprime')
	exit()
  
V = set(A)
if len(V) < N or len(A) > 78498:
	print('setwise coprime')
	exit()

Primes = []

def Sieve(n): 
	prime = [True for i in range(n + 1)] 
	p = 2
	while (p * p <= n): 
		if (prime[p] == True): 
			for i in range(p * 2, n + 1, p): 
				prime[i] = False
		p += 1
	prime[0]= False
	prime[1]= False
    # Print all prime numbers 
	for p in range(n + 1): 
		if prime[p]: 
			Primes.append(p)

Sieve(math.floor(max(A)/2)+1)

for i in range (0, len(Primes)):
	count = 0
	for j in range (0, N):
		if A[j]%Primes[i] == 0:
			count+=1
	if count > 1:
		print('setwise coprime')
		exit()

if min(A) == 1:
	print('setwise coprime')
else:
	print('pairwise coprime')