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;
namespace io {
const int __SIZE = (1 << 21) + 1;
char ibuf[__SIZE], *iS, *iT, obuf[__SIZE], *oS = obuf, *oT = oS + __SIZE - 1,
                                           __c, qu[55];
int __f, qr, _eof;
inline void flush() { fwrite(obuf, 1, oS - obuf, stdout), oS = obuf; }
inline void gc(char &x) {
  x = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                   (iS == iT ? EOF : *iS++))
                : *iS++);
}
inline void pc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
inline void pstr(const char *s) {
  int __len = strlen(s);
  for (__f = 0; __f < __len; ++__f) pc(s[__f]);
}
inline void gstr(char *s) {
  for (__c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                         (iS == iT ? EOF : *iS++))
                       : *iS++);
       __c < 32 || __c > 126 || __c == ' ';)
    __c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                    : *iS++);
  for (; __c > 31 && __c < 127 && __c != ' ';
       ++s, __c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++))
    *s = __c;
  *s = 0;
}
template <class I>
inline bool gi(I &x) {
  _eof = 0;
  for (__f = 1,
      __c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                        (iS == iT ? EOF : *iS++))
                      : *iS++);
       (__c < '0' || __c > '9') && !_eof;
       __c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                         (iS == iT ? EOF : *iS++))
                       : *iS++)) {
    if (__c == '-') __f = -1;
    _eof |= __c == EOF;
  }
  for (x = 0; __c <= '9' && __c >= '0' && !_eof;
       __c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                         (iS == iT ? EOF : *iS++))
                       : *iS++))
    x = x * 10 + (__c & 15), _eof |= __c == EOF;
  x *= __f;
  return !_eof;
}
template <class I>
inline void print(I x) {
  if (!x) pc('0');
  if (x < 0) pc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) pc(qu[qr--]);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io::gc;
using io::gi;
using io::gstr;
using io::pc;
using io::print;
using io::pstr;
template <typename T>
inline void chkmax(T &a, T b) {
  a = a > b ? a : b;
}
template <typename T>
inline void chkmin(T &a, T b) {
  a = a < b ? a : b;
}
template <typename T>
inline T gcd(T &a, T b) {
  return !b ? a : gcd(b, a % b);
}
const int mod = 1000000007;
template <typename T>
const T Mod(T x) {
  return x >= mod * 2 ? x % mod : (x >= mod ? x - mod : x);
}
template <typename T>
const void Add(T &a, T b) {
  a = Mod(a + b);
}
const int MAXN = 200100;
int n, k, d;
int a[MAXN];
int res = 1;
int res_l = 1;
int res_r = 1;
struct Segment_Tree {
  struct Node {
    long long v, t;
  } T[MAXN << 2];
  inline void pushup(int x) { T[x].v = min(T[(x << 1)].v, T[(x << 1 | 1)].v); }
  inline void pushdown(int x) {
    long long &t = T[x].t;
    if (!t) return;
    T[(x << 1)].v += t, T[(x << 1)].t += t;
    T[(x << 1 | 1)].v += t, T[(x << 1 | 1)].t += t;
    t = 0;
  }
  inline void build(int x, int l, int r) {
    T[x].v = T[x].t = 0;
    if (l == r) return;
    int mid = (l + r) >> 1;
    build((x << 1), l, mid), build((x << 1 | 1), mid + 1, r);
  }
  inline void Modify(int x, int l, int r, int L, int R, long long v) {
    if (L <= l && r <= R) return T[x].v += v, T[x].t += v, void();
    int mid = (l + r) >> 1;
    pushdown(x);
    if (L <= mid) Modify((x << 1), l, mid, L, R, v);
    if (mid < R) Modify((x << 1 | 1), mid + 1, r, L, R, v);
    pushup(x);
  }
  inline int Find(int x, int l, int r, int p) {
    if (l == r) return T[x].v <= k ? l : -1;
    int mid = (l + r) >> 1;
    pushdown(x);
    if (T[(x << 1)].v <= k) return Find((x << 1), l, mid, p);
    if (mid < p) return Find((x << 1 | 1), mid + 1, r, p);
    return -1;
  }
} seg;
int b[MAXN];
map<int, int> pos;
stack<int> up, down;
inline void solve(int l, int r) {
  for (int i = l; i <= r; i++) a[i - l + 1] = b[i] / d;
  int n = r - l + 1, las = 0;
  seg.build(1, 1, n), pos.clear();
  for (int i = 1; i <= n; i++) {
    int v = a[i];
    if (pos.count(v)) {
      seg.Modify(1, 1, n, las + 1, pos[v], 1000000000);
      las = pos[v];
    }
    pos[v] = i;
    seg.Modify(1, 1, n, 1, n, -1);
    seg.Modify(1, 1, n, i, i, i);
    while (up.top() && a[up.top()] > v) {
      int p = up.top();
      up.pop();
      seg.Modify(1, 1, n, up.top() + 1, p, a[p]);
    }
    seg.Modify(1, 1, n, up.top() + 1, i, -v);
    up.push(i);
    while (down.top() && a[down.top()] < v) {
      int p = down.top();
      down.pop();
      seg.Modify(1, 1, n, down.top() + 1, p, -a[p]);
    }
    seg.Modify(1, 1, n, down.top() + 1, i, v);
    down.push(i);
    int L = seg.Find(1, 1, n, i);
    if ((~L) && res < i - L + 1)
      res = i - L + 1, res_l = L + l - 1, res_r = i + l - 1;
  }
  while (up.top()) up.pop();
  while (down.top()) down.pop();
}
int main() {
  gi(n), gi(k), gi(d);
  if (d == 0) {
    int len = 1, now = -1, x = 0, pos = 0, L = 1, R = 1;
    for (int i = 1; i <= n; i++) {
      gi(x);
      if (x != now) {
        if (len < i - pos) len = i - pos, L = pos, R = i - 1;
        now = x, pos = i;
      }
    }
    if (len < n - pos + 1) L = pos, R = n;
    print(L), pc(' '), print(R), pc('\n');
    return 0;
  }
  int mi = 2147483647;
  for (int i = 1; i <= n; i++) gi(b[i]), chkmin(mi, b[i]);
  for (int i = 1; i <= n; i++) b[i] -= mi - 1;
  int las = b[1] % d, pos = 1;
  up.push(0), down.push(0);
  for (int i = 2; i <= n + 1; i++)
    if (las != b[i] % d || i == n + 1)
      solve(pos, i - 1), pos = i, las = b[i] % d;
  print(res_l), pc(' '), print(res_r), pc('\n');
  return 0;
}
