a, b = gets.split.map(&:to_i) ans = [] (a + 1).times do |i| (b + 1).times { |j| ans << i + 5 * j } end ans.delete(0) puts ans.uniq.sort