mn = list(map(int, input().split()))
mas = list(map(lambda x: [i for i in range(x, x + 5 * mn[1], 5)], [i for i in range(mn[0])]))
# mas - готовый 2-мерный массив
mn = list(map(int, input().split()))
mas = list(map(lambda x: [i for i in range(x, x + 5 * mn[1], 5)], [i for i in range(mn[0])]))
# mas - готовый 2-мерный массив