272 传统题

[ABC390A] 单次邻交换排序 (12435)

时间限制
2000ms
内存限制
256MiB
登顶 / 尝试
1/ 2
难度
1

[ABC390A] 单次邻交换排序 (12435)

Problem Statement

You are given an integer sequence A=(A1,A2,A3,A4,A5)A=(A_1,A_2,A_3,A_4,A_5) obtained by permuting (1,2,3,4,5)(1,2,3,4,5).

Determine whether AA can be sorted in ascending order by performing exactly one operation of swapping two adjacent elements in AA.

Input

The input is given from Standard Input in the following format:

$A_1$ $A_2$ $A_3$ $A_4$ $A_5$

Output

If AA can be sorted in ascending order by exactly one operation, print Yes; otherwise, print No.

Example

1 2 4 3 5
Yes

Note

  • Constraints:
  • AA is an integer sequence of length 55 obtained by permuting (1,2,3,4,5)(1,2,3,4,5).
  • Source: ABC390A