func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[10000000], b[10010000];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     int n;     cin >> n;     for (int i = 0; i < n; i++) {       cin >> a[i];       b[i] = a[i];     }     int p = 0;     sort(a, a + n);     for (int i = 0; i < n; i++) {       if (a[i] != b[i]) p++;     }     if (p > 2)       cout <<  NO  << endl;     else       cout <<  YES  << endl;   }   