local function gcd(a,b)
	return b>0 and gcd(b,a%b) or a
end

----------

local n=io.read("n")
local a={io.read("n")}
for i=2,n do
	a[i]=io.read("n")
end

local t={}
for i=2,1000000 do
	if not t[i] then
		for j=1,1000000//i do
			t[i*j]=i
		end
	end
end

local s={}
local pw=true
for i=1,n do
	local A=a[i]
	while A>t[A] do
		if not s[t[A]] then 
			s[t[A]]=true
		else
			pw=false
		end
		A=A//t[A]
	end
end

if pw then
	print("pairwise coprime")
else
	local sw=a[1]
	for i=2,n do
		sw=gcd(sw,a[i])
	end
	if sw==1 then
		print("setwise coprime")
	else
		print("not coprime")
	end
end
