using System; using System.Collections.Generic; using System.Linq; class Program { static int ReadInt() { return int.Parse(Console.ReadLine()); } static int[] ReadInts() { return Console.ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings() { return Console.ReadLine().Split(); } static void Calc(int a, int b) { var hs = new SortedSet(); for (int i = 0; i <= a; i++) { for (int j = 0; j <= b; j++) { if (i == 0 && j == 0) continue; hs.Add(i + j * 5); } } foreach (var e in hs) { Console.WriteLine(e); } } static void Main() { var ab = ReadInts(); int a = ab[0], b = ab[1]; Calc(a, b); } }