#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
mt19937_64 mt_rand(chrono::system_clock::now().time_since_epoch().count());
template <typename T1, typename T2>
inline bool upmax(T1& a, T2 b) {
  return (a < b ? (a = b, true) : false);
}
template <typename T1, typename T2>
inline bool upmin(T1& a, T2 b) {
  return (b < a ? (a = b, true) : false);
}
const int maxn = (int)4e5 + 100;
const int maxlog = 21;
const int base = 1e9 + 7;
const long double eps = (long double)1e-9;
const long double PI = acos(-1.);
const int inf = 2e9;
const long long llinf = 1e18;
int tmin[4 * maxn];
int tdep[4 * maxn];
int tmxdep[4 * maxn];
int table[22][maxn];
int numlog[maxn];
int n;
int a[maxn];
int L, R;
void buildTable() {
  numlog[1] = 0;
  for (int i = 2; i <= R; i++) numlog[i] = numlog[i / 2] + 1;
  for (int i = 0; i <= numlog[R]; i++) {
    int curlen = 1 << i;
    for (int j = 1; j <= R; j++) {
      if (i == 0) {
        table[i][j] = a[j];
        continue;
      }
      table[i][j] = min(table[i - 1][j], table[i - 1][j + curlen / 2]);
    }
  }
}
int GetMin(int l, int r) {
  int curlog = numlog[r - l + 1];
  return min(table[curlog][l], table[curlog][r - (1 << curlog) + 1]);
}
void bld(int v, int l, int r) {
  if (l == r)
    tmin[v] = inf;
  else {
    int m = (l + r) >> 1;
    bld(v + v, l, m);
    bld(v + v + 1, m + 1, r);
    tmin[v] = min(tmin[v + v], tmin[v + v + 1]);
  }
}
void push(int v, int l, int r) {
  if (l != r && tdep[v]) {
    tdep[v + v] += tdep[v];
    tdep[v + v + 1] += tdep[v];
    tmxdep[v + v] += tdep[v];
    tmxdep[v + v + 1] += tdep[v];
    tdep[v] = 0;
  }
}
void add(int v, int l, int r, int pos, int val, int deps) {
  if (l == r) {
    tmin[v] = val;
    tdep[v] = deps;
    tmxdep[v] = deps;
  } else {
    push(v, l, r);
    int m = (l + r) >> 1;
    if (pos <= m)
      add(v + v, l, m, pos, val, deps);
    else
      add(v + v + 1, m + 1, r, pos, val, deps);
    tmin[v] = min(tmin[v + v], tmin[v + v + 1]);
    tmxdep[v] = max(tmxdep[v + v], tmxdep[v + v + 1]);
  }
}
void upd(int v, int tl, int tr, int l, int r, int kek) {
  if (tl == l && tr == r) {
    tdep[v] += kek;
    tmxdep[v] += kek;
  } else {
    push(v, tl, tr);
    int m = (tl + tr) >> 1;
    if (l <= m) upd(v + v, tl, m, l, min(r, m), kek);
    if (r > m) upd(v + v + 1, m + 1, tr, max(l, m + 1), r, kek);
    tmxdep[v] = max(tmxdep[v + v], tmxdep[v + v + 1]);
  }
}
int getmin(int v, int tl, int tr, int l, int r) {
  if (tl == l && tr == r) {
    return tmin[v];
  } else {
    push(v, tl, tr);
    int m = (tl + tr) >> 1;
    int mn = inf;
    if (l <= m) upmin(mn, getmin(v + v, tl, m, l, min(r, m)));
    if (r > m) upmin(mn, getmin(v + v + 1, m + 1, tr, max(l, m + 1), r));
    return mn;
  }
}
int getdep(int v, int l, int r, int pos) {
  if (l == r) {
    return tmxdep[v];
  }
  push(v, l, r);
  int m = (l + r) >> 1;
  if (pos <= m)
    return getdep(v + v, l, m, pos);
  else
    return getdep(v + v + 1, m + 1, r, pos);
}
void add(int pos, int val) {
  int l = 1;
  int r = pos;
  while (l != r) {
    int m = (l + r) >> 1;
    if (GetMin(m, pos) < val) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  int dep = getdep(1, L, R, l - 1) + 1;
  if (l <= pos - 1) {
    upd(1, L, R, l, pos - 1, +1);
  }
  add(1, L, R, pos, val, dep);
}
void rem(int pos, int val) {
  int l = pos;
  int r = R;
  while (l != r) {
    int m = (l + r + 1) >> 1;
    if (GetMin(pos, m) < val) {
      r = m - 1;
    } else {
      l = m;
    }
  }
  if (l >= pos + 1) {
    upd(1, L, R, pos + 1, l, -1);
  }
  add(1, L, R, pos, val, 0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  L = 0;
  R = 2 * n;
  bld(1, L, R);
  buildTable();
  for (int i = 1; i <= n; i++) {
    add(i, a[i]);
  }
  int ans = tmxdep[1];
  int shift = 0;
  for (int i = 1; i < n; i++) {
    rem(i, a[i]);
    a[i + n] = a[i];
    add(i + n, a[i + n]);
    if (upmin(ans, tmxdep[1])) {
      shift = i;
    }
  }
  cout << ans << ' ' << shift << "\n";
  return 0;
}
