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.
The first line contains three space-separated integers *n*, *k*, *d* (1 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>; 0 ≤ *k* ≤ 2·10<sup class="upper-index">5</sup>; 0 ≤ *d* ≤ 10<sup class="upper-index">9</sup>). The second line contains *n* space-separated integers: *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> ( - 10<sup class="upper-index">9</sup> ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the actual sequence.
n, k, d = map(int, input().split())
a = list(map(int, input().split()))

left, right = 1, 1
current_subseq = [a[0]]

max_len = 1
max_start = 0

for i in range(1, n):
    if a[i] % d == current_subseq[-1] % d:
        current_subseq.append(a[i])
        right += 1
    else:
        if a[i] > current_subseq[-1]:
            current_subseq.append(a[i])
            right += 1
        else:
            while current_subseq:
                current_subseq.pop(0)
                left += 1
                if current_subseq[0] % d == a[i] % d:
                    break
            current_subseq.append(a[i])
            right += 1
    if right - left > max_len:
        max_len = right - left
        max_start = left

print(max_start, max_start + max_len - 1)
