require 'set' s = Set.new n = gets.to_i (1..n).each do |m| break if m * m > n if (n / m) * m == n l = n / m s << "#{m}#{l}" s << "#{l}#{m}" end end p s.size