#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
const int N = 4e5 + 10;
int n, a[N];
int top, stk[N], ls[N], rs[N], Tim, l[N], r[N], pos[N], dep[N];
inline void dfs(int u, int dep) {
  l[u] = ++Tim, pos[Tim] = u, ::dep[u] = dep;
  if (ls[u]) dfs(ls[u], dep + 1);
  if (rs[u]) dfs(rs[u], dep + 1);
  r[u] = Tim;
}
inline void Build() {
  stk[top = 1] = 1;
  for (register int i = (2); i <= (n * 2); i++) {
    while (a[i] < a[stk[top]] && top) ls[i] = stk[top], --top;
    if (top) rs[stk[top]] = i;
    stk[++top] = i;
  }
  while (top > 1) rs[stk[top - 1]] = stk[top], --top;
  dfs(stk[1], 1);
}
struct Seg {
  int v[N << 2], lazy[N << 2];
  inline void push_up(int u) { v[u] = max(v[u << 1], v[u << 1 ^ 1]); }
  inline void Build(int u, int l, int r) {
    if (l == r) return v[u] = dep[pos[l]], void(0);
    int mid = l + r >> 1;
    Build(u << 1, l, mid), Build(u << 1 ^ 1, mid + 1, r);
    push_up(u);
  }
  inline void upd(int u, int x) { v[u] += x, lazy[u] += x; }
  inline void push_down(int u) {
    if (lazy[u]) upd(u << 1, lazy[u]), upd(u << 1 ^ 1, lazy[u]), lazy[u] = 0;
  }
  inline void update(int u, int l, int r, int ql, int qr, int x) {
    if (l >= ql && r <= qr) return upd(u, x), void(0);
    int mid = l + r >> 1;
    push_down(u);
    if (ql <= mid) update(u << 1, l, mid, ql, qr, x);
    if (qr > mid) update(u << 1 ^ 1, mid + 1, r, ql, qr, x);
    push_up(u);
  }
} t;
inline void update(int x, int y) { t.update(1, 1, n * 2, l[x], r[x], y); }
int main() {
  n = read();
  for (register int i = (1); i <= (n); i++) a[i] = read();
  for (register int i = (n + 1); i <= (n * 2); i++) a[i] = a[i - n];
  Build(), t.Build(1, 1, n * 2);
  for (register int i = (n + 1); i <= (n * 2); i++) update(i, -1);
  pair<int, int> ans = make_pair(n, 0);
  for (register int i = (1); i <= (n); i++) {
    update(i, -1), update(i + n, 1);
    ans = min(ans, make_pair(t.v[1], i));
  }
  printf("%d %d\n", ans.first, ans.second % n);
}
