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, K, i, j, k, ansl, ansr, nex[200005], las[200005], d0[200005], d1[200005];
long long a[200005], mx, mi, d, t[200005 * 4], tag[200005 * 4];
map<long long, long long> s;
void Doit0() {
  k = 1, ansr = ansl = 1;
  for (i = 1; i <= n; i++) {
    if (a[i] != a[i - 1]) {
      if (i - k - 1 > ansr - ansl) ansl = k, ansr = i - 1;
      k = i;
    }
  }
  if (n - k > ansr - ansl) ansl = k, ansr = n;
  printf("%d %d\n", ansl, ansr);
  exit(0);
}
void Prepare() {
  las[n + 1] = n + 1;
  for (i = n; i >= 1; i--) {
    if (s[a[i]])
      nex[i] = s[a[i]];
    else
      nex[i] = n + 1;
    s[a[i]] = i, las[i] = min(las[i + 1], nex[i] - 1);
    if (i < n && (a[i] % d + d) % d != (a[i + 1] % d + d) % d) las[i] = i;
  }
}
void downtag(int x, int l, int r) {
  t[x] += tag[x];
  if (l < r) tag[x << 1] += tag[x], tag[x << 1 ^ 1] += tag[x];
  tag[x] = 0;
}
void cover(int x, int l, int r, int ll, int rr) {
  if (tag[x]) downtag(x, l, r);
  if (r < ll || l > rr) return;
  if (ll <= l && r <= rr) t[x] = tag[x] = 0;
  if (l == r) return;
  int mid = (l + r) >> 1;
  cover(x << 1, l, mid, ll, rr), cover(x << 1 ^ 1, mid + 1, r, ll, rr);
  t[x] = max(t[x << 1], t[x << 1 ^ 1]);
}
void change(int x, int l, int r, int ll, int rr, long long d) {
  if (ll > rr) return;
  if (tag[x]) downtag(x, l, r);
  if (r < ll || l > rr) return;
  if (ll <= l && r <= rr) {
    tag[x] += d, downtag(x, l, r);
    return;
  }
  int mid = (l + r) >> 1;
  change(x << 1, l, mid, ll, rr, d);
  change(x << 1 ^ 1, mid + 1, r, ll, rr, d);
  t[x] = max(t[x << 1], t[x << 1 ^ 1]);
}
int find(int x, int l, int r, int lim) {
  if (tag[x]) downtag(x, l, r);
  if (l == r) return l;
  int mid = (l + r) >> 1;
  if (t[x << 1 ^ 1] + tag[x << 1 ^ 1] >= lim)
    return find(x << 1 ^ 1, mid + 1, r, lim);
  else
    return find(x << 1, l, mid, lim);
}
int main() {
  scanf("%d%d%lld", &n, &K, &d);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  if (d == 0) Doit0();
  Prepare();
  for (i = n; i >= 1; i--) {
    if (las[i] < las[i + 1]) cover(1, 1, n, las[i] + 1, las[i + 1]);
    while (d0[0] && a[i] <= a[d0[d0[0]]]) {
      change(1, 1, n, d0[d0[0]],
             min(las[i], (d0[0] == 1) ? las[i] : d0[d0[0] - 1] - 1),
             (a[i] - a[d0[d0[0]]]) / d);
      d0[0]--;
    }
    d0[++d0[0]] = i;
    while (d1[0] && a[i] >= a[d1[d1[0]]]) {
      change(1, 1, n, d1[d1[0]],
             min(las[i], (d1[0] == 1) ? las[i] : d1[d1[0] - 1] - 1),
             (a[d1[d1[0]]] - a[i]) / d);
      d1[0]--;
    }
    d1[++d1[0]] = i;
    change(1, 1, n, i, i, i + K);
    k = find(1, 1, n, i);
    if (k - i >= ansr - ansl) ansl = i, ansr = k;
  }
  printf("%d %d\n", ansl, ansr);
}
