#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int maxn = 200000;
int t[4 * maxn];
int p[maxn];
int n;
int mina(int x, int y) {
  if (x == -1) return y;
  if (y == -1) return x;
  return (p[x] < p[y] ? x : y);
}
void build(int x, int cl, int cr) {
  if (cr - cl > 1) {
    build(2 * x, cl, (cl + cr) / 2);
    build(2 * x + 1, (cl + cr) / 2, cr);
    t[x] = mina(t[2 * x], t[2 * x + 1]);
  } else
    t[x] = cl;
}
int get(int x, int cl, int cr, int l, int r) {
  if (cr <= l || r <= cl) return -1;
  if (l <= cl && cr <= r) return t[x];
  return mina(get(2 * x, cl, (cl + cr) / 2, l, r),
              get(2 * x + 1, (cl + cr) / 2, cr, l, r));
}
int a[maxn], dpl[maxn], dpr[maxn];
int mx = 0;
void dfs(int i, int cl, int cr, int cd) {
  dpl[i] = dpr[i] = 1;
  if (i != cl) {
    int u = get(1, 0, maxn, cl, i);
    dfs(u, cl, i, cd + 1);
    dpl[i] += max(dpl[u], dpr[u]);
  }
  if (cr - i > 1) {
    int u = get(1, 0, maxn, i + 1, cr);
    dfs(u, i + 1, cr, cd + 1);
    dpr[i] += max(dpr[u], dpl[u]);
  }
}
pair<int, int> solve(int sd) {
  for (int i = sd; i < n; i++) p[i - sd] = a[i];
  for (int i = n - sd; i < n; i++) p[i] = a[i - n + sd];
  build(1, 0, maxn);
  mx = 0;
  int st = get(1, 0, maxn, 0, n);
  dfs(st, 0, n, 1);
  return {max(dpl[st], dpr[st]), dpl[st] - dpr[st]};
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = solve(0).first;
  int mi = 0;
  int st = get(1, 0, maxn, 0, n);
  int l = 0, r = st;
  while (r - l > 10) {
    int md = (l + r) / 2;
    if (solve(md).second >= 0)
      l = md;
    else
      r = md;
  }
  for (int i = l; i <= r; i++) {
    int fuck = solve(i).first;
    if (fuck < ans) {
      mi = i;
    }
    ans = min(ans, fuck);
  }
  l = st;
  r = n - 1;
  while (r - l > 10) {
    int md = (l + r) / 2;
    if (solve(md).second >= 0)
      l = md;
    else
      r = md;
  }
  for (int i = l; i <= r; i++) {
    int fuck = solve(i).first;
    if (fuck < ans) {
      mi = i;
    }
    ans = min(ans, fuck);
  }
  cout << ans << ' ' << mi;
  return 0;
}
