a,b=map(int,input().split()) s=set() for i in range(a+1): for j in range(b+1): a=i+5*j s.add(a) s.remove(0) s=list(s) s.sort() for x in s: print(x)