Maximum and minimum even digit
Problem
Given a natural number
N
(
\(N<=10^9\)). Determine its maximum even and minimum even digits.
Input
The input is a single number.
Imprint
Print two numbers separated by a space: first, the minimum even digit, then the maximum. If there are no even digits in the number, print
NO
.
It is guaranteed that if in if there are even digits, then there are at least two of them.
Examples
# |
Input |
Output |
1 |
45545 |
4 4 |
2 |
111 |
NO |
Запрещенные операторы: [
; list
; sort