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;
const int N = 200005;
int n, k, d, pre[N];
int a[N], b[N], q1[N], q2[N];
int tg[N * 4], t[N * 4];
map<int, int> mp;
pair<int, int> ans;
void SP() {
  int l = 0, S = 0, s = 1;
  for (int i = (int)(2); i <= (int)(n + 1); i++)
    if (i == n + 1 || a[i] != a[i - 1]) {
      if (s > S) S = s, l = i - S;
      s = 1;
    } else
      ++s;
  printf("%d %d\n", l, l + S - 1);
  exit(0);
}
void build(int k, int l, int r) {
  tg[k] = 0;
  t[k] = 1;
  if (l == r) return;
  int mid = (l + r) / 2;
  build(k * 2, l, mid);
  build(k * 2 + 1, mid + 1, r);
}
void pushdown(int k) {
  if (!tg[k]) return;
  tg[k * 2] += tg[k];
  tg[k * 2 + 1] += tg[k];
  t[k * 2] += tg[k];
  t[k * 2 + 1] += tg[k];
  tg[k] = 0;
}
void change(int k, int l, int r, int x, int y, int v) {
  if (x <= l && r <= y) {
    tg[k] += v, t[k] += v;
    return;
  }
  pushdown(k);
  int mid = (l + r) / 2;
  if (x <= mid) change(k * 2, l, mid, x, y, v);
  if (y > mid) change(k * 2 + 1, mid + 1, r, x, y, v);
  t[k] = min(t[k * 2], t[k * 2 + 1]);
}
int ask(int k, int l, int r, int x, int y) {
  if (x <= l && r <= y) return t[k];
  pushdown(k);
  int mid = (l + r) / 2;
  if (y <= mid) return ask(k * 2, l, mid, x, y);
  if (x > mid) return ask(k * 2 + 1, mid + 1, r, x, y);
  return min(ask(k * 2, l, mid, x, mid),
             ask(k * 2 + 1, mid + 1, r, mid + 1, y));
}
void solve(int l, int r) {
  mp.clear();
  pre[l - 1] = 0;
  for (int i = (int)(l); i <= (int)(r); i++) {
    if (!mp[a[i]])
      pre[i] = l - 1;
    else
      pre[i] = mp[a[i]];
    pre[i] = max(pre[i], pre[i - 1]);
    mp[a[i]] = i;
  }
  build(1, l, r);
  int t1 = 0, t2 = 0;
  q1[t1] = q2[t2] = l - 1;
  for (int i = (int)(l); i <= (int)(r); i++) {
    for (; t1 && a[q1[t1]] >= a[i]; --t1)
      change(1, l, r, q1[t1 - 1] + 1, q1[t1], a[q1[t1]] - a[i]);
    for (; t2 && a[q2[t2]] <= a[i]; --t2)
      change(1, l, r, q2[t2 - 1] + 1, q2[t2], a[i] - a[q2[t2]]);
    q1[++t1] = q2[++t2] = i;
    change(1, l, r, l, i, -1);
    for (;;) {
      if (i - pre[i] <= ans.first) break;
      if (ask(1, l, r, pre[i] + 1, i - ans.first) > k) break;
      ans.first++;
      ans.second = i - ans.first + 1;
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &d);
  for (int i = (int)(1); i <= (int)(n); i++) scanf("%d", &a[i]);
  if (d == 0) SP();
  for (int i = (int)(1); i <= (int)(n); i++)
    b[i] = (a[i] % d + d) % d, a[i] = (a[i] - b[i]) / d;
  int la = 1;
  for (int i = (int)(2); i <= (int)(n + 1); i++)
    if (b[i] != b[i - 1] || i == n + 1) solve(la, i - 1), la = i;
  printf("%d %d\n", ans.second, ans.second + ans.first - 1);
}
