#!/usr/bin/python3
def is_no_in_range(n, k) -> bool:
return n >= 1 and n <= k
def _main() -> None:
MAX_LEN = int(1e7)
n, m, k = list(map(int, input().split()))
seq = list(map(int, input().split()))
assert n == len(seq)
for i in range(len(seq)):
seq[i] = (seq[i] % m) + 1
mark = [0 for i in range(105)]
ptr, cnt = 0, 0
ln, a, b = MAX_LEN, -1, -1
for i in range(len(seq)):
if is_no_in_range(seq[i], k):
if mark[seq[i]] == 0:
cnt += 1
mark[seq[i]] += 1
while cnt == k and ptr < i:
flag = False
if not is_no_in_range(seq[ptr], k):
flag = True
elif mark[seq[ptr]] > 1:
flag = True
mark[seq[ptr]] -= 1
if not flag:
break
ptr += 1
if cnt == k:
cur_len = ptr - i + 1
if cur_len < ln:
ln = cur_len
a = ptr + 1
b = i + 1
elif cur_len == ln and ptr + 1 < a:
a = ptr + 1
b = i + 1
if ln == MAX_LEN:
print("Rango no encontrado")
else:
print(a, b)
if __name__ == '__main__':
_main()
IyEvdXNyL2Jpbi9weXRob24zCgpkZWYgaXNfbm9faW5fcmFuZ2UobiwgaykgLT4gYm9vbDoKCXJldHVybiBuID49IDEgYW5kIG4gPD0gawoKZGVmIF9tYWluKCkgLT4gTm9uZToKICBNQVhfTEVOID0gaW50KDFlNykKICBuLCBtLCBrID0gbGlzdChtYXAoaW50LCBpbnB1dCgpLnNwbGl0KCkpKQogIHNlcSA9IGxpc3QobWFwKGludCwgaW5wdXQoKS5zcGxpdCgpKSkKICAKICBhc3NlcnQgbiA9PSBsZW4oc2VxKQogIAogIGZvciBpIGluIHJhbmdlKGxlbihzZXEpKToKICAJc2VxW2ldID0gKHNlcVtpXSAlIG0pICsgMQogIG1hcmsgPSBbMCBmb3IgaSBpbiByYW5nZSgxMDUpXQogIHB0ciwgY250ID0gMCwgMAogIGxuLCBhLCBiID0gTUFYX0xFTiwgLTEsIC0xCiAgCiAgZm9yIGkgaW4gcmFuZ2UobGVuKHNlcSkpOgogIAlpZiBpc19ub19pbl9yYW5nZShzZXF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