#include <bits/stdc++.h>
using namespace std;
class SegTree {
 private:
  class Node {
    void merge_info() {
      if (ln != nullptr) {
        auto ldata = ln->x + ln->add;
        auto rdata = rn->x + rn->add;
        x = max(ldata, rdata);
      }
    }

   public:
    Node *ln, *rn;
    long long x, add;
    Node(long long x) {
      this->x = x;
      this->add = 0;
      this->ln = this->rn = nullptr;
    }
    Node(Node *ln, Node *rn) {
      this->add = 0;
      this->ln = ln;
      this->rn = rn;
      this->merge_info();
    }
    void norm() {
      if (ln != nullptr) {
        ln->add += add;
        rn->add += add;
      } else {
        x += add;
      }
      add = 0;
      merge_info();
    }
  };
  Node *init(vector<long long> &v, int l, int r) {
    if (l == r) return new Node(v[l]);
    int k = l + (r - l) / 2;
    Node *ln = init(v, l, k);
    Node *rn = init(v, k + 1, r);
    return new Node(ln, rn);
  }
  long long merge_query(long long *lret, long long *rret) {
    if (lret == nullptr) return *rret;
    if (rret == nullptr) return *lret;
    return max(*lret, *rret);
  }
  long long query(Node *curr, int l, int r, int i, int j) {
    curr->norm();
    if (l >= i && r <= j) return curr->x;
    int k = l + (r - l) / 2;
    long long *lret = nullptr, *rret = nullptr;
    if (k >= i && l <= j) lret = new long long(query(curr->ln, l, k, i, j));
    if (k + 1 <= j && r >= i)
      rret = new long long(query(curr->rn, k + 1, r, i, j));
    auto ret = merge_query(lret, rret);
    return ret;
  }
  void add(Node *curr, long long k, int i, int j, int l, int r) {
    if (j < l || i > r) return;
    if (l >= i && r <= j) {
      curr->add += k;
    } else {
      int m = l + (r - l) / 2;
      add(curr->ln, k, i, j, l, m);
      add(curr->rn, k, i, j, m + 1, r);
    }
    curr->norm();
  }
  int n;
  Node *root = nullptr;
  void clean(Node *v) {
    if (v == nullptr) return;
    clean(v->ln);
    clean(v->rn);
    delete v;
  }

 public:
  SegTree(vector<long long> &v) {
    this->n = v.size();
    this->root = init(v, 0, n - 1);
  }
  ~SegTree() { clean(root); }
  long long query(int i = 0, int j = -1) {
    if (j == -1) j = n - 1;
    return query(root, 0, n - 1, i, j);
  }
  void add(long long k, int i, int j = -1) {
    if (j == -1) j = n - 1;
    add(root, k, i, j, 0, n - 1);
  }
};
vector<pair<int, int>> rSteps(vector<int> &p) {
  int n = p.size(), i, j;
  int pos1 = find((p).begin(), (p).end(), 1) - p.begin();
  vector<pair<int, int>> rh(n);
  rh[pos1] = {0, 0};
  stack<pair<int, int>> d;
  d.push({1, pos1});
  j = pos1;
  for (i = 1; i < n; i++) {
    j = (j - 1 + n) % n;
    while (d.top().first > p[j]) d.pop();
    int pA = d.top().second;
    int rJ = (pA - j + n) % n;
    int hJ = pA > j ? rh[pA].second + 1 : 0;
    rh[j] = {rJ, hJ};
    d.push({p[j], j});
  }
  return rh;
}
int main() {
  int n, i;
  cin >> n;
  vector<int> p(n);
  for (i = 0; i < n; i++) cin >> p[i];
  auto rh = rSteps(p);
  reverse((p).begin(), (p).end());
  auto lh = rSteps(p);
  reverse((lh).begin(), (lh).end());
  vector<long long> v(2 * n, 0);
  for (i = 0; i < n; i++) v[i] = rh[i].second + lh[i].second;
  SegTree s(v);
  int minH = s.query(0, n - 1);
  int bestS = 0;
  for (i = 0; i < n - 1; i++) {
    int lq = i + 1, rq = i + rh[i].first - 1;
    if (lq <= rq) s.add(-1, lq, rq);
    int lI = lh[i].first;
    lq = i + n - lI + 1;
    rq = i + n - 1;
    if (lq <= rq) s.add(+1, lq, rq);
    if (lI > 0) {
      int newV = s.query(i + n - lI, i + n - lI) + 1;
      s.add(newV, i + n, i + n);
    }
    int currH = s.query(i + 1, i + n);
    if (currH < minH) {
      minH = currH;
      bestS = i + 1;
    }
  }
  cout << (minH + 1) << " " << bestS << endl;
  return 0;
}
