#include <bits/stdc++.h>
using namespace std;
struct segtree {
  long long n, h;
  vector<long long> t;
  vector<long long> d;
  segtree(vector<long long>& a) {
    n = a.size();
    t = vector<long long>(n << 1 | 1, 0);
    d = vector<long long>(n << 1 | 1);
    h = sizeof(long long) * 8 - __builtin_clz(n);
  }
  void apply(long long p, long long val) {
    t[p] += val;
    if (p < n) d[p] += val;
  }
  void build(long long p) {
    while (p > 1) p >>= 1, t[p] = max(t[p << 1], t[p << 1 | 1]) + d[p];
  }
  void push(long long p) {
    for (long long s = h; s > 0; --s) {
      long long i = p >> s;
      if (d[i] != 0) {
        apply(i << 1, d[i]);
        apply(i << 1 | 1, d[i]);
        d[i] = 0;
      }
    }
  }
  void inc(long long l, long long r, long long val) {
    if (l >= r) return;
    l += n, r += n;
    long long l0 = l, r0 = r;
    for (; l < r; l >>= 1, r >>= 1) {
      if (l & 1) apply(l++, val);
      if (r & 1) apply(--r, val);
    }
    build(l0);
    build(r0 - 1);
  }
  long long query(long long l, long long r) {
    if (l >= r) return 0;
    l += n, r += n;
    push(l), push(r - 1);
    long long ret = 0;
    while (l < r) {
      if (l & 1) {
        ret = max(ret, t[l++]);
      }
      if (r & 1) {
        ret = max(ret, t[--r]);
      }
      l >>= 1, r >>= 1;
    }
    return ret;
  }
};
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> a(2 * n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  stack<pair<long long, long long>> s;
  vector<long long> nxt(2 * n, 2 * n), prev(n << 1, -1);
  for (long long i = 0; i < 2 * n; ++i) {
    while (!s.empty() && a[i] < s.top().first) s.pop();
    if (!s.empty()) prev[i] = s.top().second;
    s.push({a[i], i});
  }
  s = stack<pair<long long, long long>>();
  for (long long i = 2 * n - 1; i >= 0; --i) {
    while (!s.empty() && a[i] < s.top().first) s.pop();
    if (!s.empty()) nxt[i] = s.top().second;
    s.push({a[i], i});
  }
  vector<long long> h(2 * n);
  segtree T = segtree(h);
  for (long long i = 0; i < n; ++i) {
    T.inc(i + 1, min(n, nxt[i]), 1);
    T.inc(prev[i] + 1, i, 1);
  }
  long long hmin = INT_MAX, shift = 0;
  for (long long s = 0; s < n; ++s) {
    long long hs = T.query(s, s + n);
    if (hmin > hs) {
      hmin = hs;
      shift = s;
    }
    T.inc(s + 1, min(s + n, nxt[s]), -1);
    if (s < n) {
      T.inc(prev[s + n] + 1, s + n, 1);
      if (prev[s + n] >= s + 1) {
        long long p = T.query(prev[s + n], prev[s + n] + 1);
        T.inc(s + n, s + n + 1, 1 + p);
      }
    }
  }
  cout << hmin + 1 << " " << shift;
}
