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 = 200000;
const int INF = 0x7fffffff;
int n, k, d, a[N + 50], ans, L, R;
map<int, int> tax;
struct SetmentTree {
  long long minn[(N << 2) + 50];
  int tag[(N << 2) + 50];
  void Add(int k, int l, int r, int v) {
    tag[k] += v;
    minn[k] += v;
    return;
  }
  void Pushdown(int k, int l, int r, int mid) {
    if (!tag[k]) return;
    Add(k << 1, l, mid, tag[k]);
    Add(k << 1 | 1, mid + 1, r, tag[k]);
    tag[k] = 0;
    return;
  }
  void Update(int k, int l, int r, int x, int y, int val) {
    if (x <= l && r <= y) {
      Add(k, l, r, val);
      return;
    }
    int mid = (l + r) >> 1;
    Pushdown(k, l, r, mid);
    if (y <= mid)
      Update(k << 1, l, mid, x, y, val);
    else if (x > mid)
      Update(k << 1 | 1, mid + 1, r, x, y, val);
    else
      Update(k << 1, l, mid, x, y, val),
          Update(k << 1 | 1, mid + 1, r, x, y, val);
    minn[k] = min(minn[k << 1], minn[k << 1 | 1]);
    return;
  }
  int Work(int k, int l, int r, int val) {
    if (l == r) return l;
    int mid = (l + r) >> 1;
    Pushdown(k, l, r, mid);
    if (minn[k << 1] <= val)
      return Work(k << 1, l, mid, val);
    else
      return Work(k << 1 | 1, mid + 1, r, val);
  }
  int Query(int k, int l, int r, int x, int y, int val) {
    if (x <= l && r <= y) {
      if (minn[k] > val) return INF;
      return Work(k, l, r, val);
    }
    int mid = (l + r) >> 1;
    Pushdown(k, l, r, mid);
    if (y <= mid)
      return Query(k << 1, l, mid, x, y, val);
    else if (x > mid)
      return Query(k << 1 | 1, mid + 1, r, x, y, val);
    else
      return min(Query(k << 1, l, mid, x, y, val),
                 Query(k << 1 | 1, mid + 1, r, x, y, val));
  }
  void Build(int k, int l, int r) {
    if (l == r) {
      minn[k] = l;
      return;
    }
    int mid = (l + r) >> 1;
    Build(k << 1, l, mid);
    Build(k << 1 | 1, mid + 1, r);
    minn[k] = min(minn[k << 1], minn[k << 1 | 1]);
    return;
  }
} tr;
struct Node {
  int zhi, pos;
};
struct Stack {
  Node st[N + 50];
  int top = 0;
  void Clear() {
    top = 0;
    return;
  }
  Node Top() { return st[top]; }
  int Empty() { return top == 0; }
  void Pop() {
    top--;
    return;
  }
  void Push(Node x) {
    st[++top] = x;
    return;
  }
} stmax, stmin;
void Read(int &x) {
  x = 0;
  int p = 0;
  char st = getchar();
  while (st < '0' || st > '9') p = (st == '-'), st = getchar();
  while (st >= '0' && st <= '9')
    x = (x << 1) + (x << 3) + st - '0', st = getchar();
  x = p ? -x : x;
  return;
}
namespace Sub0 {
int L, R, ans = 0;
void Solve() {
  int r;
  for (int i = 1; i <= n; i++) {
    r = i;
    int tmp = a[i];
    while (a[r + 1] == tmp && r + 1 <= n) r++;
    if (r - i + 1 > ans) {
      ans = r - i + 1;
      L = i;
      R = r;
    }
  }
  printf("%d %d", L, R);
  return;
}
}  // namespace Sub0
int main() {
  Read(n);
  Read(k);
  Read(d);
  tr.Build(1, 1, n);
  for (int i = 1; i <= n; i++) Read(a[i]), a[i] = a[i] + 0x3f3f3f3f;
  if (!d) {
    Sub0::Solve();
    return 0;
  }
  int r;
  for (int l = 1; l <= n; l = r + 1) {
    stmax.Clear();
    stmin.Clear();
    tax.clear();
    int zhi = a[l] % d;
    r = l;
    while (a[r + 1] % d == zhi && r + 1 <= n) r++;
    int i = l;
    for (int j = l; j <= r; j++) {
      a[j] = (a[j] - zhi) / d;
      tax[a[j]]++;
      while (tax[a[j]] > 1) tax[a[i++]]--;
      while (!stmax.Empty() && stmax.Top().zhi < a[j]) {
        Node tmp = stmax.Top();
        stmax.Pop();
        if (stmax.Empty())
          tr.Update(1, 1, n, l, tmp.pos, -tmp.zhi);
        else
          tr.Update(1, 1, n, stmax.Top().pos + 1, tmp.pos, -tmp.zhi);
      }
      if (stmax.Empty())
        tr.Update(1, 1, n, l, j, a[j]);
      else
        tr.Update(1, 1, n, stmax.Top().pos + 1, j, a[j]);
      stmax.Push((Node){a[j], j});
      while (!stmin.Empty() && stmin.Top().zhi > a[j]) {
        Node tmp = stmin.Top();
        stmin.Pop();
        if (stmin.Empty())
          tr.Update(1, 1, n, l, tmp.pos, tmp.zhi);
        else
          tr.Update(1, 1, n, stmin.Top().pos + 1, tmp.pos, tmp.zhi);
      }
      if (stmin.Empty())
        tr.Update(1, 1, n, l, j, -a[j]);
      else
        tr.Update(1, 1, n, stmin.Top().pos + 1, j, -a[j]);
      stmin.Push((Node){a[j], j});
      int Ans = tr.Query(1, 1, n, i, j, j + k);
      if (Ans != INF && j - Ans + 1 > ans) {
        ans = j - Ans + 1;
        L = Ans;
        R = j;
      }
    }
  }
  printf("%d %d", L, R);
  return 0;
}
