import math
n=int(input())
arr=list(map(int,input().split()))
count=0
f=1
for i in range(len(arr)):
	for j in range(i+1,len(arr)):
		if math.gcd(arr[i],arr[j])!=1:
			f=0
if f:
	print('pairwise coprime')
else:
	x=arr[0]
	for i in range(1,len(arr)):
		x=math.gcd(x,arr[i])
	if x==1:
		print('setwise coprime')
	else:
		print('not coprime')

		                                         