import numpy as np A,B = map(int,input().split()) X = np.arange(A + 1) Y = np.arange(B + 1) * 5 can = np.add.outer(X,Y).ravel() can = np.sort(np.unique(can)) can = can.astype(str) print('\n'.join(can[1:]))