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 INF = 1e9;
template <typename T>
inline T read() {
  register T sum = 0;
  register char cc = getchar();
  int sym = 1;
  while (cc != '-' && (cc > '9' || cc < '0')) cc = getchar();
  if (cc == '-') sym = -1, cc = getchar();
  sum = sum * 10 + cc - '0';
  cc = getchar();
  while (cc >= '0' && cc <= '9') sum = sum * 10 + cc - '0', cc = getchar();
  return sym * sum;
}
template <typename T>
inline T read(T& a) {
  a = read<T>();
  return a;
}
template <typename T, typename... Others>
inline void read(T& a, Others&... b) {
  a = read(a);
  read(b...);
}
int n, K, d, las = 1, ansl = 1e9, ansr = 1e9, a[200010], b[200010], c[200010];
int tp1, tp2, sta1[200010], sta2[200010];
int mn[200010 << 2], tag[200010 << 2];
map<int, int> mp;
void Effect(int k, int v) {
  mn[k] += v;
  tag[k] += v;
}
void down(int k) {
  if (tag[k]) {
    Effect(k << 1, tag[k]);
    Effect(k << 1 | 1, tag[k]);
    tag[k] = 0;
  }
}
void build(int k, int l, int r) {
  if (l == r) {
    mn[k] = l;
    return;
  }
  int mid = (l + r) >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  mn[k] = min(mn[k << 1], mn[k << 1 | 1]);
}
void change(int k, int l, int r, int x, int y, int z) {
  if (l >= x && r <= y) {
    Effect(k, z);
    return;
  }
  down(k);
  int mid = (l + r) >> 1;
  if (x <= mid) change(k << 1, l, mid, x, y, z);
  if (y > mid) change(k << 1 | 1, mid + 1, r, x, y, z);
  mn[k] = min(mn[k << 1], mn[k << 1 | 1]);
}
int query(int k, int l, int r, int x, int y, int v) {
  if (mn[k] > v) return -1;
  if (l >= x && r <= y) {
    if (l == r) return l;
    down(k);
    int mid = (l + r) >> 1;
    if (mn[k << 1] <= v) return query(k << 1, l, mid, x, y, v);
    return query(k << 1 | 1, mid + 1, r, x, y, v);
  }
  down(k);
  int mid = (l + r) >> 1, res;
  if (x <= mid) {
    res = query(k << 1, l, mid, x, y, v);
    if (res != -1) return res;
  }
  if (y > mid) {
    res = query(k << 1 | 1, mid + 1, r, x, y, v);
    if (res != -1) return res;
  }
  return -1;
}
int main() {
  read(n, K, d);
  if (!d) {
    for (int i = 1; i <= n; i++) read(a[i]);
    for (int i = 1; i <= n; i++) {
      if (a[las] != a[i]) las = i;
      if (ansr - ansl < i - las || ((ansr - ansl == i - las) && ansl > las))
        ansl = las, ansr = i;
    }
    printf("%d %d\n", ansl, ansr);
    return 0;
  }
  build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
    a[i] += INF;
    c[i] = a[i] / d;
    b[i] = a[i] - d * c[i];
  }
  for (int i = 1; i <= n; i++) {
    if (b[las] != b[i]) las = i;
    if (mp.count(a[i])) las = max(las, mp[a[i]] + 1);
    while (tp1 && c[sta1[tp1]] < c[i]) {
      change(1, 1, n, sta1[tp1 - 1] + 1, sta1[tp1], -c[sta1[tp1]]);
      tp1 -= 1;
    }
    change(1, 1, n, sta1[tp1] + 1, i, c[i]);
    sta1[++tp1] = i;
    while (tp2 && c[sta2[tp2]] > c[i]) {
      change(1, 1, n, sta2[tp2 - 1] + 1, sta2[tp2], c[sta2[tp2]]);
      tp2 -= 1;
    }
    change(1, 1, n, sta2[tp2] + 1, i, -c[i]);
    sta2[++tp2] = i;
    int res = query(1, 1, n, las, i, i + K);
    if (res != -1 &&
        (ansr - ansl < i - res || ((ansr - ansl == i - res) && ansl > res)))
      ansl = res, ansr = i;
    mp[a[i]] = i;
  }
  printf("%d %d\n", ansl, ansr);
  return 0;
}
