prime factors exercise in ruby