require 'prime' class Yukicoder def initialize x = gets.to_i p x.prime_division.to_h.select{|k,v| v.odd?}.keys.inject(:*) || 1 end end Yukicoder.new