import sys input=lambda: sys.stdin.readline().rstrip() a,b=map(int,input().split()) S=set() for i in range(1,a+1): for j in range(1,b+1): S.add(i+5*j) S=sorted(list(S)) for s in S: print(s)