# frozen_string_literal: true

require 'prime'

n = gets.to_i
a = gets.split.map(&:to_i)
b = []
a.each do |e|
  b.push e.prime_division.map(&:first)
end

b.flatten!

if b.size == b.uniq.size
  puts 'pairwise coprime'
  exit
end
g = a[0]
(1..(n - 1)).each do |i|
  g = g.gcd(a[i])
end

if g == 1
  puts 'setwise coprime'
else
  puts 'not coprime'
end
