We'll call a sequence of integers a good k-d sequence if we can add to it at most k numbers in such a way that after the sorting the sequence will be an arithmetic progression with difference d.

You got hold of some sequence a, consisting of n integers. Your task is to find its longest contiguous subsegment, such that it is a good k-d sequence.

Input

The first line contains three space-separated integers n, k, d (1 ≤ n ≤ 2·105; 0 ≤ k ≤ 2·105; 0 ≤ d ≤ 109). The second line contains n space-separated integers: a1, a2, ..., an ( - 109 ≤ ai ≤ 109) — the actual sequence.

Output

Print two space-separated integers l, r (1 ≤ l ≤ r ≤ n) show that sequence al, al + 1, ..., ar is the longest subsegment that is a good k-d sequence.

If there are multiple optimal answers, print the one with the minimum value of l.

Examples

Input

6 1 2
4 3 2 8 6 2


Output

3 5

Note

In the first test sample the answer is the subsegment consisting of numbers 2, 8, 6 — after adding number 4 and sorting it becomes sequence 2, 4, 6, 8 — the arithmetic progression with difference 2.
#include <bits/stdc++.h>
using namespace std;
int n, d, K, second[300005];
vector<pair<int, int> > G[300005];
long long ad[300005 << 2], mn[300005 << 2];
void dtp1(int u, int v) { ad[u] += v, mn[u] += v; }
void dt(int u) {
  if (ad[u]) dtp1(u << 1, ad[u]), dtp1(u << 1 | 1, ad[u]), ad[u] = 0;
}
void add(int u, int l, int r, int ql, int qr, int v) {
  if (l > qr || ql > r) return;
  if (ql <= l && r <= qr) return (void)(dtp1(u, v));
  int m = l + r >> 1;
  dt(u);
  add(u << 1, l, m, ql, qr, v), add(u << 1 | 1, m + 1, r, ql, qr, v);
  mn[u] = min(mn[u << 1], mn[u << 1 | 1]);
}
int qy(int u, int l, int r) {
  if (l == r) return l;
  dt(u);
  int m = l + r >> 1;
  if (mn[u << 1] <= K) return qy(u << 1, l, m);
  return qy(u << 1 | 1, m + 1, r);
}
int qry(int u, int l, int r, int ql, int qr) {
  if (l > qr || ql > r) return -1;
  if (ql <= l && r <= qr) return mn[u] <= K ? qy(u, l, r) : -1;
  int m = l + r >> 1;
  dt(u);
  int t = qry(u << 1, l, m, ql, qr);
  if (t == -1) return qry(u << 1 | 1, m + 1, r, ql, qr);
  return t;
}
int st[2][300005], qr[2], al = 1, ar;
int scd, sud;
map<int, int> cd, usd;
long long ans[300005];
int main() {
  scanf("%d%d%d", &n, &K, &d);
  for (int i = 1; i <= n; i++) scanf("%d", &second[i]), second[i] += 1e9;
  if (d == 0) {
    for (int i = 1, j = 1; i <= n; i = j) {
      for (j = i; second[j] == second[i]; j++)
        ;
      if (j - 1 - i > ar - al) ar = j - 1, al = i;
    }
    printf("%d %d\n", al, ar);
    return 0;
  }
  for (int i = 1, j = 1; i <= n; i++) {
    for (; qr[0] && second[st[0][qr[0]]] >= second[i]; qr[0]--)
      add(1, 1, n, st[0][qr[0] - 1] + 1, st[0][qr[0]],
          (second[st[0][qr[0]]] / d));
    st[0][++qr[0]] = i;
    add(1, 1, n, st[0][qr[0] - 1] + 1, i, -(second[i] / d));
    for (; qr[1] && second[st[1][qr[1]]] <= second[i]; qr[1]--)
      add(1, 1, n, st[1][qr[1] - 1] + 1, st[1][qr[1]],
          -(second[st[1][qr[1]]] / d));
    st[1][++qr[1]] = i;
    add(1, 1, n, st[1][qr[1] - 1] + 1, i, second[i] / d);
    if (i > 1) add(1, 1, n, 1, i - 1, -1);
    scd += (cd[second[i] % d]++ == 0);
    sud += (++usd[second[i]] == 2);
    for (; j <= n && (scd > 1 || sud >= 1); j++)
      scd -= (--cd[second[j] % d] == 0), sud -= (usd[second[j]]-- == 2);
    int tl = qry(1, 1, n, j, i);
    if (i - tl > ar - al) al = tl, ar = i;
  }
  printf("%d %d\n", al, ar);
}
