Teacher Sorting

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

The 9-th grade students are doing Physical Education, they have just run a long distance. The lesson is approaching its end, so the teacher asked students to stand in a line in non-decreasing order of their heights. Students don't always pay their attention, so sometimes they stand in a line not in the order they were asked. The teacher wants to fix the problem.

The teacher looks at the line, and if it's not ordered properly, chooses the ii-th and the jj-th student in the line, and swaps them. So after the swap, a the ii-th student becomes the jj-th student, and the other way around. Teacher keeps doing swaps, until the line is ordered properly. Formally speaking, until for all ii --- the (i+1)(i+1)-th student is not shorter than the ii-th student in the line.

Although today it won't be easy for the teacher. Students are very tired after the run so they can hardly stand. The teacher doesn't want to overload them physically, so the teacher won't move any student more than once.

The teacher needs your help. You are given the line: a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n --- the heights of the students. Find the sequence of swaps for teacher to make the line ordered properly, or say that it's not possible.

입력

The first line contains an integer nn --- the number of students (1n21051 \le n \le 2 \cdot 10^5).

The second line contains nn integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n (0a_i1090 \le a\_i \le 10^9). The number a_ia\_i is the height of the ii-th student in the line.

출력

If the teacher won't be able to order the students properly, print "No".

Otherwise, print "Yes" in the first line. In the second line print an integer kk --- the number of swaps the teacher needs to make. In each of the next kk lines print two integers ii and jj, denoting that the teacher should swap the ii-th and the jj-th students in the line.

Note that you don't have to minimize the number of swaps. You can print any sequence that will make the line ordered properly in a way that no student was swapped more than once.