#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 50;
int n, a[N];
int l[N], r[N];
int mx[N << 2], t[N << 2];
void up(int x) { mx[x] = max(mx[x << 1], mx[x << 1 | 1]) + t[x]; }
void mdf(int x, int l, int r, int L, int R, int v) {
  if (L <= l && r <= R) return mx[x] += v, t[x] += v, void();
  if (L <= ((l + r) >> 1)) mdf(x << 1, l, ((l + r) >> 1), L, R, v);
  if (R > ((l + r) >> 1)) mdf(x << 1 | 1, ((l + r) >> 1) + 1, r, L, R, v);
  up(x);
}
int ask(int x, int l, int r, int L, int R) {
  if (L <= l && r <= R) return mx[x];
  int ans = 0;
  if (L <= ((l + r) >> 1)) ans = max(ans, ask(x << 1, l, ((l + r) >> 1), L, R));
  if (R > ((l + r) >> 1))
    ans = max(ans, ask(x << 1 | 1, ((l + r) >> 1) + 1, r, L, R));
  return ans + t[x];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i + n] = a[i];
  static int s[N];
  int top = 0;
  for (int i = 1; i <= n + n; i++) {
    while (top && a[i] < a[s[top]]) --top;
    l[i] = s[top];
    s[++top] = i;
  }
  s[top = 0] = n + n + 1;
  for (int i = n + n; i; i--) {
    while (top && a[i] < a[s[top]]) --top;
    r[i] = s[top];
    s[++top] = i;
  }
  for (int i = 1; i <= n; i++) mdf(1, 1, n + n, l[i] + 1, r[i] - 1, 1);
  int ans = n, mn = 0;
  for (int i = 1; i <= n; i++) {
    int z = ask(1, 1, n + n, i, i + n - 1);
    if (z < ans) ans = z, mn = i - 1;
    mdf(1, 1, n + n, l[i] + 1, r[i] - 1, -1);
    mdf(1, 1, n + n, l[i + n] + 1, r[i + n] - 1, 1);
  }
  cout << ans << " " << mn << '\n';
  return 0;
}
