* The two largest digits are 2
Problem
Given a natural number
N
(
\(N<=10^9\)). Determine the two largest digits of a number.
Input
The input is a natural number.
Imprint
Output two space-separated digits, first the largest digit of the number, then the second largest (not equal to the first largest digit). If the number consists of the same digits, print
NO
.
Examples
# |
Input |
Output |
1 |
45545 |
5 4 |
2 |
111 |
NO |
Запрещенные операторы: list
; [
; sort