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()
    
import collections as col
chinbi = col.deque(A)

while chinbi:
	q = chinbi.popleft()
	count = 0
	for i in range (0, len(chinbi)):
		if chinbi[i]%q == 0:
			count+=1
	if count > 1:
		print('setwise coprime')
		exit()
        
print('pairwise coprime')