#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int SUM = 0, ff = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    SUM = (SUM << 3) + (SUM << 1) + (ch ^ 48);
    ch = getchar();
  }
  return SUM * ff;
}
const int N = 400010;
int n, m;
int a[N], l[N], r[N];
int stk[N], tops;
struct segment {
  int val, tag;
} tree[N << 2];
inline void pushup(int rt) {
  tree[rt].val = max(tree[(rt << 1)].val, tree[((rt << 1) | 1)].val);
}
inline void pushdown(int rt) {
  if (!tree[rt].tag) return;
  tree[(rt << 1)].val += tree[rt].tag;
  tree[(rt << 1)].tag += tree[rt].tag;
  tree[((rt << 1) | 1)].val += tree[rt].tag;
  tree[((rt << 1) | 1)].tag += tree[rt].tag;
  tree[rt].tag = 0;
}
inline void modify(int rt, int l, int r, int L, int R, int val) {
  if (L <= l && r <= R) {
    tree[rt].val += val;
    tree[rt].tag += val;
    return;
  }
  pushdown(rt);
  int mid = (l + r) >> 1;
  if (L <= mid) modify((rt << 1), l, mid, L, R, val);
  if (R > mid) modify(((rt << 1) | 1), mid + 1, r, L, R, val);
  pushup(rt);
}
inline int query(int rt, int l, int r, int L, int R) {
  if (L <= l && r <= R) return tree[rt].val;
  pushdown(rt);
  int mid = (l + r) >> 1;
  int res = 0;
  if (L <= mid) res = max(res, query((rt << 1), l, mid, L, R));
  if (R > mid) res = max(res, query(((rt << 1) | 1), mid + 1, r, L, R));
  return res;
}
int ans, pos;
int main() {
  n = read(), m = 2 * n;
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    a[i + n] = a[i];
    r[i] = r[i + n] = m + 1;
  }
  for (int i = 1; i <= m; i++) {
    while (tops && a[stk[tops]] > a[i]) {
      r[stk[tops]] = i;
      tops--;
    }
    if (tops) l[i] = stk[tops];
    stk[++tops] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] != 1) modify(1, 1, m, l[i] + 1, r[i] - 1, 1);
  }
  ans = query(1, 1, m, 1, n);
  pos = 0;
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] == 1) continue;
    modify(1, 1, m, l[i] + 1, r[i] - 1, -1);
    modify(1, 1, m, l[i + n] + 1, r[i + n] - 1, 1);
    int now = query(1, 1, m, i + 1, i + n);
    if (now < ans) {
      ans = now;
      pos = i;
    }
  }
  printf("%d %d\n", ans + 1, pos);
  return 0;
}
