a, b = gets.chomp.split.map &:to_i ms = [] (a + 1).times {|aa| (b + 1).times{|bb| ms << aa + bb * 5 } } puts ms.sort.uniq[1..]