#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #ifndef LOCAL #define debug(x) ; #else #define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl; template ostream &operator<<(ostream &out, const pair &p) { out << "{" << p.first << ", " << p.second << "}"; return out; } template ostream &operator<<(ostream &out, const vector &v) { out << '{'; for (const T &item : v) out << item << ", "; out << "\b\b}"; return out; } #endif #define mod 1000000007 //1e9+7(prime number) #define INF 1000000000 //1e9 #define LLINF 2000000000000000000LL //2e18 #define SIZE 200010 int main(){ int N, a[SIZE]; scanf("%d", &N); for (int i=0; i a[N-1]) { puts("No"); return 0; } else { puts("Yes"); } for (int i=N; i>a[N-1]; i--) { printf("%d ", i); } for (int i=N-1; i>=0; i--) { if (a[i] < a[N-1]) { printf("%d%c", a[i], " \n"[i==0]); } } return 0; }