a = [i for i in range(1,123)]
mins = 9*99
maxs = -9*99
for i in a:
if i % 7 == 0 and str(i)[-1] == "2":
if mins > i:
mins = i
if maxs < i:
maxs = i
if mins != 9*99:
print(f"макс = {maxs} | мин = {mins}")
else:
print("нет")
a = [i for i in range(1,123)]
mins = 9*99
maxs = -9*99
for i in a:
if i % 7 == 0 and str(i)[-1] == "2":
if mins > i:
mins = i
if maxs < i:
maxs = i
if mins != 9*99:
print(f"макс = {maxs} | мин = {mins}")
else:
print("нет")