n = gets.to_i
arr = gets.split(' ').map(&:to_i)
arr1 = arr.combination(2).map {|a,b| a.gcd(b) }

if arr1.all? {|e| e == 1 }
  puts "pairwise coprime"
else
  arr2 = arr1.combination(2).map {|a,b| a.gcd(b) }
  if arr2.all? {|e| e == 1 }
    puts "setwise coprime"
  else
    puts "not coprime"
  end
end
