A, B = map(int, input().split()) for i in range(B+1): for j in range(A+1): if i == j == 0: pass else: print(i*5 + j*1)