func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     long long n;     cin >> n;     long long a[n], b[n];     long long i;     for (i = 0; i < n; i++) {       cin >> a[i];       b[i] = a[i];     }     sort(a, a + n);     long long count = 0;     for (i = 0; i < n; i++) {       if (a[i] != b[i]) {         count++;       }     }     if (count == 2 || count == 0) {       cout <<  YES  << endl;     } else {       cout <<  NO  << endl;     }   }   