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;
map<long long, long long> last;
long long n, k, d, pos, flag, ans_l = 1, ans_r = 1;
long long a[200005], Min[200005], Max[200005];
long long t[200005 << 4], tag[200005 << 4];
void build(long long num, long long l, long long r) {
  t[num] = l, tag[num] = 0;
  if (l == r) return;
  long long mid = (l + r) >> 1;
  build(num << 1, l, mid);
  build(num << 1 | 1, mid + 1, r);
}
void pushdown(long long num) {
  t[num << 1] += tag[num];
  tag[num << 1] += tag[num];
  t[num << 1 | 1] += tag[num];
  tag[num << 1 | 1] += tag[num];
  tag[num] = 0;
}
void modify(long long num, long long l, long long r, long long pos) {
  pushdown(num);
  if (l == r) {
    t[num] = 0;
    return;
  }
  long long mid = (l + r) >> 1;
  if (pos <= mid)
    modify(num << 1, l, mid, pos);
  else
    modify(num << 1 | 1, mid + 1, r, pos);
  t[num] = min(t[num << 1], t[num << 1 | 1]);
}
void modify(long long num, long long l, long long r, long long L, long long R,
            long long w) {
  if (R < l || r < L) return;
  if (L <= l && r <= R) {
    t[num] += w, tag[num] += w;
    return;
  }
  pushdown(num);
  long long mid = (l + r) >> 1;
  modify(num << 1, l, mid, L, R, w);
  modify(num << 1 | 1, mid + 1, r, L, R, w);
  t[num] = min(t[num << 1], t[num << 1 | 1]);
}
void find(long long num, long long l, long long r, long long k) {
  if (l == r) {
    pos = l, flag = 1;
    return;
  }
  pushdown(num);
  long long mid = (l + r) >> 1;
  if (t[num << 1] <= k)
    find(num << 1, l, mid, k);
  else
    find(num << 1 | 1, mid + 1, r, k);
}
void query(long long num, long long l, long long r, long long L, long long R,
           long long k) {
  if (flag || r < L || R < l) return;
  if (L <= l && r <= R) {
    if (t[num] <= k) find(num, l, r, k);
    return;
  }
  pushdown(num);
  long long mid = (l + r) >> 1;
  query(num << 1, l, mid, L, R, k);
  query(num << 1 | 1, mid + 1, r, L, R, k);
}
signed main() {
  scanf("%lld %lld %lld", &n, &k, &d);
  for (long long i = 1; i <= n; i++) scanf("%lld", &a[i]);
  if (!d) {
    long long l = 0, r = 0;
    for (long long i = 1; i <= n; i++) {
      if (a[i] != a[i - 1])
        l = r = i;
      else
        ++r;
      if (r - l > ans_r - ans_l) ans_r = r, ans_l = l;
    }
    return !printf("%lld %lld\n", ans_l, ans_r);
  }
  build(1, 1, n);
  long long min_top = 0, max_top = 0;
  for (long long r = 1, l = 1; r <= n; r++) {
    long long t = l;
    if ((a[r] - a[r - 1]) % d)
      l = r;
    else
      l = max(l, last[a[r]] + 1);
    last[a[r]] = r;
    while (t < l) modify(1, 1, n, t++);
    while (min_top && Min[min_top] >= l && a[Min[min_top]] > a[r]) {
      modify(1, 1, n, Min[min_top - 1] + 1, Min[min_top], a[Min[min_top]] / d);
      min_top--;
    }
    modify(1, 1, n, max(l, Min[min_top] + 1), r, -a[r] / d);
    Min[++min_top] = r;
    while (max_top && Max[max_top] >= l && a[Max[max_top]] < a[r]) {
      modify(1, 1, n, Max[max_top - 1] + 1, Max[max_top], -a[Max[max_top]] / d);
      max_top--;
    }
    modify(1, 1, n, max(l, Max[max_top] + 1), r, a[r] / d);
    Max[++max_top] = r;
    flag = 0, pos = 0;
    query(1, 1, n, l, r, k + r);
    if (r - pos > ans_r - ans_l) ans_l = pos, ans_r = r;
  }
  printf("%lld %lld\n", ans_l, ans_r);
  return 0;
}
