n = int(raw_input())

result = 1;
resultList = []
for i in range(5):
	result = n * (i+1)
	resultList.append(str(result))

print ' '.join(resultList)
	
a9f8bcf90648b611f76cf45cfa0e6b6fc5eba094
n = int(raw_input())

result = 1;
resultList = []
for i in range(5):
	result = n * (i+1)
	resultList.append(str(result))

print ' '.join(resultList)
	