import math
from functools import reduce
n = int(input())
a = list(map(int,input().split()))

def gcd(*numbers):
	return reduce(math.gcd, numbers)

def gcd_list(numbers):
	return reduce(math.gcd, numbers)

def gcd(a, b):
	if (a == 0 or b == 0): 
		return False
	if (a == b): 
		return a
	if (a > b): 
		return gcd(a-b, b)

	return gcd(a, b-a)

def coprime(a, b):
	return (gcd(a, b) == 1) 

def numOfPairs(arr, n) : 
	count = 0

	for i in range(0, n-1) : 
		for j in range(i+1, n) :

			if (coprime(arr[i], arr[j])):
				count = count + 1

	return count 

if numOfPairs(a,n) == n:
	print('pairwise coprime')
elif gcd_list(a) == 1:
	print('setwise coprime')
else:
	print('not coprime')