#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, inf = 1061109567;
const long long infll = 4557430888798830399;
const int N = 4e5 + 5;
class SegTree {
  int t[N << 2], lazy[N << 2];
  void build(int l, int r, int x) {
    if (l == r) {
      t[x] = 0;
      return;
    }
    int m = (l + r) >> 1;
    build(l, m, x << 1), build(m + 1, r, x << 1 | 1);
    t[x] = 0;
  }
  void push(int l, int r, int x) {
    if (l != r) {
      lazy[x << 1] += lazy[x];
      lazy[x << 1 | 1] += lazy[x];
    }
    t[x] += lazy[x];
    lazy[x] = 0;
  }
  void upd(int l, int r, int s, int e, int x, int val) {
    push(l, r, x);
    if (l > e || r < s) return;
    if (s <= l && r <= e) {
      lazy[x] += val;
      push(l, r, x);
      return;
    }
    int m = (l + r) >> 1;
    upd(l, m, s, e, x << 1, val);
    upd(m + 1, r, s, e, x << 1 | 1, val);
    t[x] = max(t[x << 1], t[x << 1 | 1]);
  }
  int getMax(int l, int r, int s, int e, int x) {
    push(l, r, x);
    if (l > e || r < s) return -inf;
    if (s <= l && r <= e) return t[x];
    int m = (l + r) >> 1;
    return max(getMax(l, m, s, e, x << 1), getMax(m + 1, r, s, e, x << 1 | 1));
  }

 public:
  int n;
  void init(int _n) {
    n = _n;
    build(0, n - 1, 1);
  }
  void upd(int l, int r, int val) { upd(0, n - 1, l, r, 1, val); }
  int get(int l, int r) { return getMax(0, n - 1, l, r, 1); }
} st;
int n, a[N], ans[N], rangeL[N], rangeR[N], rmq[N][20], logy[N];
int answerMin(int l, int r) {
  int tmp = logy[r - l + 1];
  return min(rmq[l][tmp], rmq[r - (1 << tmp) + 1][tmp]);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  for (int i = 0; i < 2 * n; i++) rmq[i][0] = a[i];
  for (int j = 1; j < 20; j++)
    for (int i = 0; i < 2 * n; i++)
      if (i + (1 << (j - 1)) < 2 * n) {
        rmq[i][j] = min(rmq[i][j - 1], rmq[i + (1 << (j - 1))][j - 1]);
      }
  for (int i = 0; i < 2 * n; i++) logy[i] = log2(i);
  st.init(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    int l = max(0, i - n + 1), r = i;
    while (l < r) {
      int m = (l + r) >> 1;
      if (answerMin(m, i) >= a[i])
        r = m;
      else
        l = m + 1;
    }
    rangeL[i] = l;
    l = i, r = min(2 * n - 1, i + n - 1);
    while (l < r) {
      int m = (l + r) >> 1;
      if (answerMin(i, m + 1) >= a[i])
        l = m + 1;
      else
        r = m;
    }
    rangeR[i] = l;
  }
  for (int i = 0; i < n; i++) {
    st.upd(rangeL[i], rangeR[i], 1);
  }
  ans[0] = st.get(0, n - 1);
  for (int rotation = 1; rotation < n; rotation++) {
    st.upd(rangeL[rotation - 1], rangeR[rotation - 1], -1);
    st.upd(rangeL[rotation + n - 1], rangeR[rotation + n - 1], 1);
    ans[rotation] = st.get(rotation, rotation + n - 1);
  }
  int mnAns = inf, mnInd = -1;
  for (int rotation = 0; rotation < n; rotation++)
    if (ans[rotation] < mnAns) {
      mnAns = ans[rotation];
      mnInd = rotation;
    }
  cout << mnAns << " " << mnInd;
  return 0;
}
