require "prime"
n = gets.chomp.to_i
a_arr = gets.chomp.split(" ").map(&:to_i)

hash = {}
a_arr.each do |a|
  Prime.prime_division(a).each do |(p, num)|
    hash[p] ||= 0
    hash[p] += 1
  end
end

max = 0
min = 10 ** 7
hash.each do |k, v|
  max = v if v > max
  min = v if v < min
end

if max == n
  puts "not coprime"
elsif min == 1
  puts "pairwise coprime"
else
  puts "setwise coprime"
end
