require 'prime'
n = gets.to_i
a = gets.split.map(&:to_i)
if a.inject{ _1.gcd _2 } != 1
  puts 'not coprime'
else
  res = []
  a.each do |ai|
    t = ai.prime_division.transpose[0]
    if t.count != (t - res).count
      puts 'setwise coprime'
      exit 0
    end
    res.push *t
  end
  puts 'pairwise coprime'
end