func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   int a[200010];   int main() {     bool bo = 0;     int X, Y = -1, t, Mx = 0;     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %d , &a[i]);       Mx = max(Mx, a[i]);     }     for (int i = 2; i <= n; i++) {       t = abs(a[i] - a[i - 1]);       if (t == 0) {         bo = 1;         break;       }       if (t == 1) continue;       if (Y == -1)         Y = t;       else {         if (t == Y)           continue;         else {           bo = 1;           break;         }       }     }     if (!bo && Y <= 1e9 && Y != -1) {       for (int i = 1; i < n; i++) {         if (a[i] % Y == 0 && a[i + 1] == a[i] + 1) {           bo = 1;           break;         }         if (a[i] % Y == 1 && a[i + 1] == a[i] - 1) {           bo = 1;           break;         }       }     }     if (Y == -1) Y = Mx;     if (bo || Y > 1e9)       printf( NO n );     else {       X = Mx / Y;       if (Mx % Y != 0) X++;       if (X > 1e9)         printf( NO n );       else {         printf( YES n );         printf( %d %d , X, Y);       }     }     return 0;   }   