import math
n=int(input())
arr=list(map(int,input().split()))

f=1
x=arr[0]
for i in range(1,len(arr)):
	x=math.gcd(x,arr[i])
	if x!=1:
		f=0
if f:
	print('pairwise coprime')
else:
	if x==1:
		print('setwise coprime')
	else:
		print('not coprime')