using System; using System.Collections.Generic; using System.Linq; class Solution { static void Main() { var vals = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); int a = vals[0]; int b = vals[1]; var moneys = new List(); foreach(var i in Enumerable.Range(0,a+1)) { foreach (var j in Enumerable.Range(0, b+1)) { moneys.Add(i + j * 5); } } moneys.Remove(0); moneys = moneys.Distinct().OrderBy(m => m).ToList(); foreach (var m in moneys) { Console.WriteLine(m); } } }