n = gets.to_i
arr = gets.split.map(&:to_i)
num = Array.new(1e6+50) {0}
g = 0

for i in arr
	g = g.gcd i
end

if g != 1
	puts "no coprime"
	exit
end

for i in arr
	j = i
	while j <= 1e6
		num[j] += 1
		j += i
	end
end

for i in arr
	if num[i] >= 2
		puts "setwise coprime"
		exit
	end
end

puts "pairwise coprime"