import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B = map(int,read().split()) se = set(a+5*b for a in range(A+1) for b in range(B+1)) print('\n'.join(map(str,sorted(se)[1:])))