require 'prime'

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

if arr2.flatten.empty?
  puts "pairwise coprime"
elsif arr1.inject(:&).empty?
  puts "setwise coprime"
else
  puts "not coprime"
end
