require 'prime' p gets.to_i.prime_division.map{|a|a[0]}.sort.drop_while{|i|i<3}[0]