#include <bits/stdc++.h>
using namespace std;
int n;
int a[400005], l[400005], r[400005];
struct Segment_Tree {
  int d[400005 * 4], add[400005 * 4];
  void push_down(int idx, int l, int r) {
    if (l == r) {
      add[idx] = 0;
      return;
    }
    d[idx << 1] += add[idx];
    add[idx << 1] += add[idx];
    d[idx << 1 | 1] += add[idx];
    add[idx << 1 | 1] += add[idx];
    add[idx] = 0;
    d[idx] = max(d[idx << 1], d[idx << 1 | 1]);
  }
  void update(int idx, int l, int r, int a, int b, int x) {
    push_down(idx, l, r);
    if (l > b || r < a) return;
    if (l >= a && r <= b) {
      add[idx] += x;
      d[idx] += x;
      return;
    }
    int m = (l + r) / 2;
    update(idx << 1, l, m, a, b, x);
    update(idx << 1 | 1, m + 1, r, a, b, x);
    d[idx] = max(d[idx << 1], d[idx << 1 | 1]);
  }
  int query(int idx, int l, int r, int a, int b) {
    push_down(idx, l, r);
    if (l > b || r < a) return 0;
    if (l >= a && r <= b) return d[idx];
    int m = (l + r) / 2;
    return max(query(idx << 1, l, m, a, b),
               query(idx << 1 | 1, m + 1, r, a, b));
  }
} smt;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i + n] = a[i];
  }
  r[2 * n] = 2 * n;
  for (int i = 2 * n - 1; i >= 1; i--) {
    if (a[i] > a[i + 1])
      r[i] = i;
    else {
      r[i] = r[i + 1];
      while (a[i] < a[r[i] + 1]) r[i] = r[r[i] + 1];
    }
  }
  l[1] = 1;
  for (int i = 2; i <= 2 * n; i++) {
    if (a[i] > a[i - 1])
      l[i] = i;
    else {
      l[i] = l[i - 1];
      while (a[i] < a[l[i] - 1]) l[i] = l[l[i] - 1];
    }
  }
  for (int i = 1; i <= n; i++) smt.update(1, 1, 2 * n, l[i], r[i], 1);
  int ans = INT_MAX;
  int p = 0;
  for (int i = 1; i <= n; i++) {
    int now = smt.query(1, 1, 2 * n, i, i + n - 1);
    if (now < ans) {
      ans = now;
      p = i - 1;
    }
    smt.update(1, 1, 2 * n, l[i], r[i], -1);
    smt.update(1, 1, 2 * n, l[i + n], r[i + n], 1);
  }
  printf("%d %d\n", ans, p);
  return 0;
}
