require 'prime' y = 1 gets.to_i.prime_division.each{|i| y *= i[0] if i[1].odd? } puts y