func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     int a[n];     for (int i = 0; i < n; i++) {       cin >> a[i];     }     sort(a, a + n);     for (int i = 0; i < n - 2; i++) {       if (a[i] == a[i + 1] && a[i] == a[i + 2]) {         cout <<  NO ;         return 0;       }     }     cout <<  YES  << endl;     vector<int> v1, v2;     v1.push_back(a[0]);     for (int i = 1; i < n; i++) {       if (a[i] != a[i - 1])         v1.push_back(a[i]);       else         v2.push_back(a[i]);     }     int p = v1.size();     int r = v2.size();     cout << p << endl;     for (int i = 0; i < p; i++) {       cout << v1[i] <<    ;     }     cout << endl;     cout << r << endl;     for (int i = r - 1; i >= 0; i--) {       cout << v2[i] <<    ;     }   }   