
max_7 = 0 sec_max = 0 x = int(input()) count=0 while x != 0: count += 1 if x % 7 == 0 and x % 49 != 0 and x > max_7: max_7 = x elif x % 7 != 0 and sec_max < x: sec_max = x x = int(input()) control = int(input()) result = sec_max*max_7 if result == 0: result = 1 print(f'Введено чисел: {count}') print(f'Контрольное значение: {control}') print(f'Вычисленное значение: {result}') if result == control: print('Значения совпали') else: print('Значения не совпали')