def main(): a,b=map(int,input().split()) ans=set() for i in range(0,a+1): for j in range(0,b+1): ans.add(i+j*5) for i in ans: if i!=0: print(i) if __name__ == "__main__": main()