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


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 last_gcd = 0
	local a_t = {}
	local a_max = 0

	for i = 1, n do
		local a_i = read("n")
		a_t[i] = a_i
		a_max = max(a_max, a_i)
		last_gcd = gcd(max(last_gcd, a_i), min(last_gcd, a_i))
	end
	if last_gcd ~= 1 then
		print("not coprime")
		return
	end

	local num_t = {}
	for i = 1, a_max do
		num_t[i] = 0
	end
	for i = 1, n do
		num_t[a_t[i]] = num_t[a_t[i]] + 1
	end

	-- [2, a_iの最大値]の数を全探索(1は含まない)
	for i = 2, a_max do
		local count = 0
		-- iの倍数の中にa_iが存在するとカウントアップ
		for j = i, a_max, i do
			count = count + num_t[j]
		end
		-- 1つより大きければ重複しているので
		if count > 1 then
			print("setwise coprime")
			return
		end
	end
	print("pairwise coprime")
end

main()