#include <bits/stdc++.h>
using namespace std;
const int MN = 200200;
const int MM = MN * 2;
class SP {
 private:
  long long n, h;
  vector<long long> lt, w;
  vector<vector<long long> > st;
  void pre() {
    for (int i = 0; i < n; i++) {
      st[i][0] = i;
    }
    for (int j = 1; j <= h; j++) {
      for (int i = 0; i + (1 << j) <= n; i++) {
        long long a = st[i][j - 1], b = st[i + (1 << (j - 1))][j - 1];
        if (w[a] < w[b]) {
          st[i][j] = a;
        } else {
          st[i][j] = b;
        }
      }
    }
  }

 public:
  SP(vector<long long> ar) {
    n = ar.size();
    w = ar;
    h = 0;
    lt.assign(2, 0);
    for (int i = 2; i <= n; i++) {
      lt.push_back(lt[i / 2] + 1);
    }
    h = lt[n] + 1;
    st.assign(n, vector<long long>(h, -1));
    pre();
  }
  long long qu(long long l, long long r) {
    long long j = lt[r - l + 1];
    long long a = st[l][j], b = st[(r - (1 << j) + 1)][j];
    if (w[a] < w[b]) return a;
    return b;
  }
  vector<long long> arr() { return w; }
};
class ST {
 private:
  int n, h;
  vector<long long> st, lz;
  const long long STV = -1LL << 62;
  int log2(int v) {
    if (v <= 1) return 1;
    return log2(v / 2) + 1;
  }
  void ap(int p, int val) {
    st[p] += val;
    if (p < n) {
      lz[p] += val;
    }
  }
  void build(int p) {
    while (p > 1) {
      p >>= 1;
      if (p >= n) continue;
      st[p] = max(st[p << 1], st[p << 1 | 1]) + lz[p];
    }
  }
  void psh(int p) {
    for (int s = h; s > 0; s--) {
      int i = p >> s;
      if (lz[i] != 0) {
        ap(i << 1, lz[i]);
        ap(i << 1 | 1, lz[i]);
        lz[i] = 0;
      }
    }
  }

 public:
  ST(int _n) {
    n = _n;
    h = log2(n);
    st.assign(2 * n, 0);
    lz.assign(n, 0);
  }
  void up(int l, int r, long long val) {
    if (l >= r) return;
    l += n;
    r += n;
    int li = l, ri = r;
    for (; l < r; l >>= 1, r >>= 1) {
      if (l & 1) {
        ap(l++, val);
      }
      if (r & 1) {
        ap(--r, val);
      }
    }
    build(li);
    build(ri - 1);
  }
  long long qu(int l, int r) {
    l += n;
    r += n;
    psh(l);
    psh(r - 1);
    long long res = STV;
    for (; l < r; l >>= 1, r >>= 1) {
      if (l & 1) {
        res = max(res, st[l++]);
      }
      if (r & 1) {
        res = max(res, st[--r]);
      }
    }
    return res;
  }
};
ST sa(MM);
int w[MN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> tv(2 * n);
  for (int i = 0; i < n; i++) {
    cin >> w[i];
    tv[i] = tv[i + n] = w[i];
  }
  SP sb(tv);
  for (int i = 0; i < n; i++) {
    long long s = 0, e = i;
    long long id = -1, lv;
    while (s <= e) {
      long long m = (s + e) / 2;
      if (tv[sb.qu(m, i)] < w[i]) {
        id = m;
        s = m + 1;
      } else {
        e = m - 1;
      }
    }
    if (id < 0) {
      lv = 1;
    } else {
      lv = sa.qu(id, id + 1) + 1;
    }
    sa.up(id + 1, i, 1);
    sa.up(i, i + 1, lv);
  }
  long long ma = sa.qu(0, n), mi = 0;
  for (int i = 0; i < n; i++) {
    long long s = i + 1, e = i + n;
    long long x = -1, lv;
    while (s <= e) {
      long long m = (s + e) / 2;
      if (tv[sb.qu(i + 1, m)] < w[i]) {
        x = m;
        e = m - 1;
      } else {
        s = m + 1;
      }
    }
    if (x < 0) {
      x = i + n;
    }
    long long id = -1;
    s = i + 1, e = i + n;
    while (s <= e) {
      long long m = (s + e) / 2;
      if (tv[sb.qu(m, i + n)] < w[i]) {
        id = m;
        s = m + 1;
      } else {
        e = m - 1;
      }
    }
    if (id < 0) {
      lv = 1;
    } else {
      lv = sa.qu(id, id + 1) + 1;
    }
    sa.up(i, x, -1);
    sa.up(id + 1, i + n, 1);
    sa.up(i + n, i + n + 1, lv);
    long long nn = sa.qu(i + 1, i + n + 1);
    if (nn < ma) {
      ma = nn;
      mi = i + 1;
    }
  }
  cout << ma << " " << mi << '\n';
}
