n = gets.chomp.to_i

arr = n.times.map { gets.chomp.to_f.rationalize }

count = 0
(0...arr.length).each { |i|
    ((i + 1)...arr.length).each { |j|
        res = arr[i] * arr[j]
        if res - res.to_i == 0
            puts "#{arr[i]} #{arr[j]}"
            count += 1
        end
    }
}

puts count