from sys import stdin
input=lambda : stdin.readline().strip()
from math import ceil,sqrt,factorial
from collections import deque
from bisect import bisect_left,bisect_right
def isPrime(n) : 
	# Corner cases 
	if (n <= 1) : 
		return False
	if (n <= 3) : 
		return True

	# This is checked so that we can skip 
	# middle five numbers in below loop 
	if (n % 2 == 0 or n % 3 == 0) : 
		return False

	i = 5
	while(i * i <= n) : 
		if (n % i == 0 or n % (i + 2) == 0) : 
			return False
		i = i + 6

	return True

# print all prime numbers 
# less than equal to N 
dp=[]
def printPrime(n): 
	for i in range(2, n + 1): 
		if isPrime(i): 
			dp.append(i)


n = 1000		
printPrime(n) 
# print(dp)
def gcd(a,b):
	while a%b!=0:
		a,b=b,a%b
	return b
n=int(input())
l=list(map(int,input().split()))
flag=1
a=l[n-1]
s=set()
z=list(l)
for i in range(n):
	j=0
	while l[i]>1 and j<len(dp):
		if l[i]%dp[j]==0:
			l[i]//=dp[j]
			if dp[j] in s:
				flag=0
				break
			while l[i]%dp[j]==0:
				l[i]//=dp[j]
			s.add(dp[j])
		j+=1
	if flag==0:
		break
	if l[i]>1:
		s.add(l[i])
if flag:
	print("pairwise coprime")
	exit()
a=z[0]
for i in range(1,n):
	a=gcd(max(a,z[i]),min(a,z[i]))
if a==1:
	print("setwise coprime")
	exit()
print("not coprime")
