hs={} 1.upto(10**6){|i| hs[i**3]=0 } if hs.member?(gets.to_i) then puts "Yes" else puts "No" end