local read = io.read
local max = math.max
local min = math.min

local max_n = 1000003


local function gcd(x, y)
	if y == 0 then
		return x
	else
		return gcd(y, x % y)
	end
end

local function main()
	local n = read("n")
	local num_t = {}
	for i = 1, max_n do
		num_t[i] = 0
	end
	local z = 0
	for i = 1, n do
		local x = read("n")
		num_t[x] = num_t[x] + 1
		z = gcd(max(z, x), min(z, x))
	end
	if z ~= 1 then
		print("not coprime")
		return
	end

	for i = 2, max_n do
		local cnt = 0
		for j = i, max_n, i do
			cnt = cnt + num_t[j]
		end
		if cnt > 1 then
			print("setwise coprime")
			return
		end
	end
	print("pairwise coprime")
end

main()