Submit | All submissions | Best solutions | Back to list |
EI2021Q13 - DESCENDING |
Given a positive integer N (0 ≤ N ≤ 1016). Write a program to check if all digits in N are in descending order?
Input
an integer N (0 ≤ N ≤ 1016)
Output
Write YES if all digits in N are in descending, otherwise write NO
Example
Input: 988765553200 Output: YES Input: 765587654321 Output: NO