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 k, d, opl, opr, B[N];
int MIN[N * 4], LZ[N * 4];
inline void Shift(int id) {
  LZ[(id << 1)] += LZ[id];
  MIN[(id << 1)] += LZ[id];
  LZ[((id << 1) ^ 1)] += LZ[id];
  MIN[((id << 1) ^ 1)] += LZ[id];
  LZ[id] = 0;
}
void Add(int le, int ri, int val, int id, int l, int r) {
  if (ri <= l || r <= le) return;
  if (le <= l && r <= ri) {
    LZ[id] += val;
    MIN[id] += val;
    return;
  }
  Shift(id);
  Add(le, ri, val, (id << 1), l, (l + r >> 1));
  Add(le, ri, val, ((id << 1) ^ 1), (l + r >> 1), r);
  MIN[id] = min(MIN[(id << 1)], MIN[((id << 1) ^ 1)]);
}
int Get(int le, int ri, int id, int l, int r) {
  if (ri <= l || r <= le || MIN[id] >= k) return (N);
  if (r - l < 2) return (l);
  Shift(id);
  int rt = Get(le, ri, (id << 1), l, (l + r >> 1));
  if (rt != N) return (rt);
  return (Get(le, ri, ((id << 1) ^ 1), (l + r >> 1), r));
}
inline void Solve(vector<int> A, int jp) {
  A.insert(A.begin(), -1);
  int n = (int)A.size(), lb = 1;
  map<int, int> Last;
  vector<int> MX, MN;
  MX.push_back(0);
  MN.push_back(0);
  for (int i = 1; i < n; i++) {
    A[i] /= d;
    lb = max(Last[A[i]] + 1, lb);
    Last[A[i]] = i;
    while (MX.size() > 1 && A[MX.back()] <= A[i])
      Add(MX[(int)MX.size() - 2] + 1, MX.back() + 1, A[i] - A[MX.back()], 1, 1,
          n),
          MX.pop_back();
    while (MN.size() > 1 && A[MN.back()] >= A[i])
      Add(MN[(int)MN.size() - 2] + 1, MN.back() + 1, A[MN.back()] - A[i], 1, 1,
          n),
          MN.pop_back();
    MX.push_back(i);
    MN.push_back(i);
    Add(lb, i + 1, -1, 1, 1, n);
    int l = Get(max(lb, 1), i + 1, 1, 1, n);
    if (opr - opl < i - l + 1) opr = jp + i, opl = jp + l - 1;
  }
  for (int i = 0; i <= n * 4; i++) MIN[i] = LZ[i] = 0;
  return;
}
int main() {
  int n;
  scanf("%d%d%d", &n, &k, &d);
  for (int i = 0; i < n; i++) scanf("%d", &B[i]);
  if (d == 0) {
    for (int i = 0; i < n; i++) {
      int r = i;
      while (r < n && B[r] == B[i]) r++;
      if (opr - opl < r - i) opr = r, opl = i;
      r = i - 1;
    }
    return !printf("%d %d\n", opl + 1, opr);
  }
  vector<int> A;
  for (int i = 0; i < n; i++) {
    B[i] += (int)(1e9);
    if (A.size() && A.back() % d != B[i] % d)
      Solve(A, i - (int)A.size()), A.clear();
    A.push_back(B[i]);
  }
  Solve(A, n - (int)A.size());
  return !printf("%d %d\n", opl + 1, opr);
}
