#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; vectorA(N); rep(i,N)cin>>A[i]; vector>V(N); rep(i,N){ int b=1; while(b*b<=A[i]){ if((A[i]+b)/(b+1)+(A[i]%(b+1)==0)<2*N)V[i].push_back((A[i]+b)/(b+1)+(A[i]%(b+1)==0)); if(b<2*N)V[i].push_back(b); b++; } if(A[i]+1<2*N)V[i].push_back(A[i]+1); sort(all(V[i])); V[i].erase(unique(all(V[i])),V[i].end()); } vectorS(2*N+1); rep(i,N-1){ vectorX; for(auto x:V[i])X.push_back(x); for(auto x:V[i+1])X.push_back(x); X.push_back(2*N); sort(all(X)); X.erase(unique(all(X)),X.end()); int l=X.size(); rep(j,l-1){ int px=X[j],qx=X[j+1]; if(A[i]/px