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 Maxn = 2 * 1e5 + 10;
const int inf = 1e9;
int N, K, D;
int A[Maxn];
int lmin[Maxn], lmax[Maxn];
stack<pair<int, int> > S;
void Pre() {
  while (!S.empty()) S.pop();
  S.push(make_pair(0, INT_MAX));
  for (int i = 1; i <= N; i++) {
    while (A[i] > S.top().second) S.pop();
    lmax[i] = S.top().first + 1;
    S.push(make_pair(i, A[i]));
  }
  while (!S.empty()) S.pop();
  S.push(make_pair(0, INT_MIN));
  for (int i = 1; i <= N; i++) {
    while (A[i] < S.top().second) S.pop();
    lmin[i] = S.top().first + 1;
    S.push(make_pair(i, A[i]));
  }
}
int rt, tot, lc[Maxn * 4], rc[Maxn * 4], Maxc[Maxn * 4], Minc[Maxn * 4],
    C[Maxn * 4], ln[Maxn * 4], lx[Maxn * 4];
void Link(int &u, int L, int R, int k) {
  if (!u) u = ++tot, lx[u] = INT_MAX, ln[u] = INT_MAX;
  if (L == R) return;
  int mid = (L + R) >> 1;
  if (k <= mid)
    Link(lc[u], L, mid, k);
  else
    Link(rc[u], mid + 1, R, k);
}
void Push_down(int u, int L, int R) {
  if (ln[u] != INT_MAX) {
    int mid = (L + R) >> 1;
    ln[lc[u]] = ln[rc[u]] = ln[u];
    Minc[lc[u]] = -ln[u] + L;
    Minc[rc[u]] = -ln[u] + mid + 1;
    C[lc[u]] = Maxc[lc[u]] - ln[u];
    C[rc[u]] = Maxc[rc[u]] - ln[u];
    ln[u] = INT_MAX;
  }
  if (lx[u] != INT_MAX) {
    int mid = (L + R) >> 1;
    lx[lc[u]] = lx[rc[u]] = lx[u];
    Maxc[lc[u]] = lx[u] + L;
    Maxc[rc[u]] = lx[u] + mid + 1;
    C[lc[u]] = Minc[lc[u]] + lx[u];
    C[rc[u]] = Minc[rc[u]] + lx[u];
    lx[u] = INT_MAX;
  }
}
void Change1(int u, int L, int R, int l, int r, int c) {
  if (L == l && R == r) {
    Maxc[u] = c + L;
    C[u] = c + Minc[u];
    lx[u] = c;
    return;
  }
  int mid = (L + R) >> 1;
  Push_down(u, L, R);
  if (r <= mid)
    Change1(lc[u], L, mid, l, r, c);
  else if (l > mid)
    Change1(rc[u], mid + 1, R, l, r, c);
  else {
    Change1(lc[u], L, mid, l, mid, c);
    Change1(rc[u], mid + 1, R, mid + 1, r, c);
  }
  Maxc[u] = min(Maxc[lc[u]], Maxc[rc[u]]);
  Minc[u] = min(Minc[lc[u]], Minc[rc[u]]);
  C[u] = min(C[lc[u]], C[rc[u]]);
}
void Change2(int u, int L, int R, int l, int r, int c) {
  if (L == l && R == r) {
    Minc[u] = -c + L;
    C[u] = Maxc[u] - c;
    ln[u] = c;
    return;
  }
  int mid = (L + R) >> 1;
  Push_down(u, L, R);
  if (r <= mid)
    Change2(lc[u], L, mid, l, r, c);
  else if (l > mid)
    Change2(rc[u], mid + 1, R, l, r, c);
  else {
    Change2(lc[u], L, mid, l, mid, c);
    Change2(rc[u], mid + 1, R, mid + 1, r, c);
  }
  Maxc[u] = min(Maxc[lc[u]], Maxc[rc[u]]);
  Minc[u] = min(Minc[lc[u]], Minc[rc[u]]);
  C[u] = min(C[lc[u]], C[rc[u]]);
}
int Dfs(int u, int L, int R, int k) {
  int mid = (L + R) >> 1;
  if (L == R) {
    if (C[u] > k)
      return INT_MAX;
    else
      return L;
  }
  Push_down(u, L, R);
  if (C[lc[u]] <= k)
    return Dfs(lc[u], L, mid, k);
  else
    return Dfs(rc[u], mid + 1, R, k);
}
int Query(int u, int L, int R, int l, int r, int k) {
  if (L == l && R == r) return Dfs(u, L, R, k);
  Push_down(u, L, R);
  int mid = (L + R) >> 1;
  if (r <= mid)
    return Query(lc[u], L, mid, l, r, k);
  else if (l > mid)
    return Query(rc[u], mid + 1, R, l, r, k);
  else {
    return min(Query(lc[u], L, mid, l, mid, k),
               Query(rc[u], mid + 1, R, mid + 1, r, k));
  }
}
map<int, int> mp;
int main() {
  scanf("%d%d%d", &N, &K, &D);
  for (int i = 1; i <= N; i++) scanf("%d", &A[i]), A[i] += inf;
  if (D == 0) {
    int j, px, py, len = 0;
    for (int i = 1; i <= N; i = j) {
      j = i;
      while (A[j] == A[i] && j <= N) j++;
      if (j - i > len) len = j - i, px = i, py = j - 1;
    }
    printf("%d %d\n", px, py);
  } else {
    Pre();
    rt = tot = 0;
    for (int i = 1; i <= N; i++) Link(rt, 1, N, i);
    int last = 1;
    int len = 0, px, py;
    for (int i = 1; i <= N; i++) {
      if ((A[i] - A[i - 1]) % D != 0) last = i;
      if (mp[A[i]]) last = max(last, mp[A[i]] + 1);
      mp[A[i]] = i;
      Change1(rt, 1, N, max(last, lmax[i]), i, A[i] / D);
      Change2(rt, 1, N, max(last, lmin[i]), i, A[i] / D);
      int x = Query(rt, 1, N, last, i, K + i);
      if (i - x + 1 > len) len = i - x + 1, px = x, py = i;
    }
    printf("%d %d\n", px, py);
  }
  return 0;
}
