minNumber = 9**999
while True:
a = int(input())
if a == 0:
break
elif a < minNumber:
if a <= 0:
print("не натуральное")
else:
minNumber = a
print(f"Минимальное число {minNumber}")
minNumber = 9**999
while True:
a = int(input())
if a == 0:
break
elif a < minNumber:
if a <= 0:
print("не натуральное")
else:
minNumber = a
print(f"Минимальное число {minNumber}")