[ABC390A] 单次邻交换排序 (12435)
Problem Statement
You are given an integer sequence obtained by permuting .
Determine whether can be sorted in ascending order by performing exactly one operation of swapping two adjacent elements in .
Input
The input is given from Standard Input in the following format:
$A_1$ $A_2$ $A_3$ $A_4$ $A_5$
Output
If can be sorted in ascending order by exactly one operation, print Yes; otherwise, print No.
Example
1 2 4 3 5
Yes
Note
- Constraints:
- is an integer sequence of length obtained by permuting .
- Source: ABC390A