#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(false);cin.tie(0);
using namespace std;
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define mp make_pair
#define all(a) a.begin(),a.end()
#define bitcnt(x) __builtin_popcountll(x)
#define MOD 1000000007
#define MOD2 100000
#define MAXN 304002
#define BLOCK 100
#define BASE 31
typedef unsigned long long int uint64;
typedef long long int int64;

int a[500005];
int BIT[2][500005];

int query(int idx,int x){
	int ret=0;
	while(x){
		ret+=BIT[idx][x];
		x-=x&(-x);
	}
	return ret;
}

void upd(int idx,int x){
	for(int i=x;i<=500002;i+=i&(-i))
	BIT[idx][i]++;
}

int main(){
	int n,i;
	scanf("%d",&n);
	
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	int l=-1,r=-1,ans=0;
	for(i=1;i<=n;i++){
		int cur=(i-1)-query(0,a[i]);
		if(cur>ans){
			ans=cur;
			r=i;
		}
		upd(0,a[i]);
	}
	ans=0;
	for(i=n;i>=1;i--){
		int cur=query(1,a[i]);
		if(cur>ans){
			ans=cur;
			l=i;
		} 
        if(cur==ans){
            l=i;
        }
		upd(1,a[i]);
	}
	if((l==-1)||(r==-1)){
		printf("Cool Array");
	}
	else{
		printf("%d %d",l,r);
	}
	return 0;
}