#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 7;
struct SegmentTree {
  int a[N << 2], lazy[N << 2];
  inline void pull(int rt) { a[rt] = max(a[rt << 1], a[rt << 1 | 1]); }
  inline void push(int rt) {
    if (lazy[rt]) {
      a[rt << 1] += lazy[rt];
      a[rt << 1 | 1] += lazy[rt];
      lazy[rt << 1] += lazy[rt];
      lazy[rt << 1 | 1] += lazy[rt];
      lazy[rt] = 0;
    }
  }
  void build(int *depth, int l, int r, int rt) {
    if (l == r) {
      a[rt] = depth[l];
      return;
    }
    int mid = l + r >> 1;
    build(depth, l, mid, rt << 1);
    build(depth, mid + 1, r, rt << 1 | 1);
    pull(rt);
  }
  void update(int L, int R, int val, int l, int r, int rt) {
    if (R < l || r < L || R < L) return;
    if (L <= l && r <= R) {
      a[rt] += val;
      lazy[rt] += val;
      return;
    }
    push(rt);
    int mid = l + r >> 1;
    update(L, R, val, l, mid, rt << 1);
    update(L, R, val, mid + 1, r, rt << 1 | 1);
    pull(rt);
  }
  void update2(int p, int val, int l, int r, int rt) {
    if (l == r) {
      a[rt] = val;
      return;
    }
    push(rt);
    int mid = l + r >> 1;
    if (p <= mid)
      update2(p, val, l, mid, rt << 1);
    else
      update2(p, val, mid + 1, r, rt << 1 | 1);
    pull(rt);
  }
  int query(int L, int R, int l, int r, int rt) {
    if (R < l || r < L || R < L) return 0;
    if (L <= l && r <= R) return a[rt];
    push(rt);
    int mid = l + r >> 1;
    return max(query(L, R, l, mid, rt << 1),
               query(L, R, mid + 1, r, rt << 1 | 1));
  }
} Tree;
int n;
int a[N << 1];
int stk[N << 1], top;
int L[N << 1], R[N << 1];
int ls[N], rs[N];
bool vis[N];
int depth[N];
void dfs(int u, int dep) {
  depth[u] = dep;
  if (ls[u]) dfs(ls[u], dep + 1);
  if (rs[u]) dfs(rs[u], dep + 1);
}
void modify(int l, int r, int val) {
  if (l > r) return;
  if (l > n) l -= n;
  if (r > n) r -= n;
  if (l <= r)
    Tree.update(l, r, val, 1, n, 1);
  else {
    Tree.update(1, r, val, 1, n, 1);
    Tree.update(l, n, val, 1, n, 1);
  }
}
void show() {
  for (int i = 1; i <= n; i++) printf("%d: %d\n", i, Tree.query(i, i, 1, n, 1));
  puts("");
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) a[i + n] = a[i];
  top = 0;
  for (int i = 1; i <= n * 2; i++) {
    while (top && a[stk[top]] > a[i]) top--;
    L[i] = top ? stk[top] : 0;
    stk[++top] = i;
  }
  top = 0;
  for (int i = n * 2; i >= 1; i--) {
    while (top && a[stk[top]] > a[i]) top--;
    R[i] = top ? stk[top] : (n * 2 + 1);
    stk[++top] = i;
  }
  top = 0;
  for (int i = 1; i <= n; i++) {
    int tmp = top;
    while (top && a[stk[tmp]] > a[i]) tmp--;
    if (tmp) rs[stk[tmp]] = i;
    if (tmp < top) ls[i] = stk[tmp + 1];
    stk[++tmp] = i;
    top = tmp;
  }
  for (int i = 1; i <= n; i++) vis[ls[i]] = vis[rs[i]] = true;
  int Rt = -1;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) Rt = i;
  dfs(Rt, 1);
  Tree.build(depth, 1, n, 1);
  pair<int, int> ans = make_pair(Tree.query(1, n, 1, n, 1), 0);
  for (int i = 1; i < n; i++) {
    int l = i + 1;
    int r = min(R[i], i + n) - 1;
    modify(l, r, -1);
    r = i + n - 1;
    l = max(i, L[i + n]) + 1;
    modify(l, r, 1);
    int pos = (l - 1) > n ? (l - 1 - n) : (l - 1);
    int now_depth = (l - 1 <= i) ? 1 : (Tree.query(pos, pos, 1, n, 1) + 1);
    Tree.update2(i, now_depth, 1, n, 1);
    ans = min(ans, make_pair(Tree.query(1, n, 1, n, 1), i));
  }
  printf("%d %d\n", ans.first, ans.second);
  return 0;
}
