using System.Linq; using System.Collections.Generic; using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); var hs = new HashSet(); for (int i = 0; i <= a; i++) for (int j = 0; j <= b; j++) hs.Add(i + 5 * j); hs.Remove(0); foreach (var x in hs.OrderBy(y => y)) Console.WriteLine(x); } }