5489: MUH and Important Things

内存限制:256 MB 时间限制:2 S
题面:传统 评测方式:文本比较 上传者:
提交:5 通过:1

题目描述

   是时候让圣彼得堡动物园的北极熊Menshykov和Uslada以及基辅动物园的大象Horace开始工作了。一天总共有n项任务,每只动物都应该完成每项任务。对于每项任务,他们都评估了其难度。动物们也决定按照难度的顺序完成任务。不幸的是,有些任务可能具有相同的难度,因此执行任务的顺序可能会有所不同。
Menshykov、Uslada和Horace要求你处理这个麻烦,并为他们每个人制定单独的计划。该计划是一个序列,描述了动物应该完成所有n项任务的顺序。此外,他们每个人都想有自己独特的计划。因此,三个计划必须形成三个不同的序列。你要找到所需的计划,或者通过说明不可能为给定的任务提出三个不同的计划来向他们传达不幸的消息。



输入格式

Input
The first line contains integer n (1≤n≤2000) − the number of tasks. The second line contains n integers h1,h2,...,hn (1≤hi≤2000), where hi is the difficulty of the i-th task. The larger number hi is, the more difficult the i-th task is.
Output
In the first line print "YES" (without the quotes), if it is possible to come up with three distinct plans of doing the tasks. Otherwise print in the first line "NO" (without the quotes). If three desired plans do exist, print in the second line n distinct integers that represent the numbers of the tasks in the order they are done according to the first plan. In the third and fourth line print two remaining plans in the same form.
If there are multiple possible answers, you can print any of them.
Examples
Input
4
1 3 3 1
Output
YES
1 4 2 3 
4 1 2 3 
4 1 3 2 
Input
5
2 4 1 4 8
Output
NO
Note
In the first sample the difficulty of the tasks sets one limit: tasks 1 and 4 must be done before tasks 2 and 3. That gives the total of four possible sequences of doing tasks : [1, 4, 2, 3], [4, 1, 2, 3], [1, 4, 3, 2], [4, 1, 3, 2]. You can print any three of them in the answer.
In the second sample there are only two sequences of tasks that meet the conditions − [3, 1, 2, 4, 5] and [3, 1, 4, 2, 5]. Consequently, it is impossible to make three distinct sequences of tasks.

输入样例 复制


输出样例 复制