#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef long long int ll; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ ll N; cin>>N; ll right=0,right_i=0,left=0,left_i=N+1; bool sorted = true; int prev = 0; for(ll i=1;i<=N;i++) { ll val; cin>>val; if(val<prev) sorted = false; prev = val; ll temp_L = i-val; if(temp_L>0) { if(temp_L>left ) { left_i = i; left = temp_L; } else if(temp_L==left && i<left_i) { left_i = i; left = temp_L; } } ll temp_R = val-i; if(temp_R>0) { if(temp_R>right) { right_i = i; right = temp_R; } else if(temp_R==right && i<right_i){ right_i = i; right = temp_R; } } //cout<<left_i<<":"<<left<<" "<<right_i<<":"<<right<<endl;; } if(!sorted) { cout<<right_i<<" "<<left_i<<endl; } else { cout<<"Cool Array"<<endl; } return 0; }