You've got an array *a*, consisting of *n* integers: *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. Your task is to find a minimal by inclusion segment [*l*, *r*] (1 ≤ *l* ≤ *r* ≤ *n*) such, that among numbers *a*<sub class="lower-index">*l*</sub>,  *a*<sub class="lower-index">*l* + 1</sub>,  ...,  *a*<sub class="lower-index">*r*</sub> there are exactly *k* distinct numbers.

Segment [*l*, *r*] (1 ≤ *l* ≤ *r* ≤ *n*; *l*, *r* are integers) of length *m* = *r* - *l* + 1, satisfying the given property, is called minimal by inclusion, if there is no segment [*x*, *y*] satisfying the property and less then *m* in length, such that 1 ≤ *l* ≤ *x* ≤ *y* ≤ *r* ≤ *n*. Note that the segment [*l*, *r*] doesn't have to be minimal in length among all segments, satisfying the given property.
The first line contains two space-separated integers: *n* and *k* (1 ≤ *n*, *k* ≤ 10<sup class="upper-index">5</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> — elements of the array *a* (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">5</sup>).
n,k = map(int, input().split(' '))
a = list(map(int, input().split(' ')))

d = [0] * (10**5 + 5)
cnt = 0
j = 0

for i in range(n):
  if d[a[i]] == 0:
    cnt += 1
    d[a[i]] += 1
  
  #if cnt == k:
  while cnt == k:
    d[a[j]] -= 1
    
    if d[a[j]] == 0:
      print(j+1, i +1)
      exit()
    j+=1

print(-1,-1)

'''
9 4
4 7 7 4 7 4 7 7 2 3 4 5 6 9
j j j j j j       i  

d[2] = 1
d[3] = 1
d[4] = 1
d[7] = 2

6 9
'''






'''
l = r = 0
flag = False

for i in range (n):
  for j in range(i+1,n):
    
    d = [0]*100005
    cnt = 0
    for t in range (i,j+1):
      if d[a[t]] == 0:
        cnt += 1
        d[a[t]] = 1
    if cnt == k:
      if flag == False:
        r = j
        l = i
        flag = True
      else:
        if (j - i) < (r - l) :
          r = j
          l = i
      
if flag == True:
  print(l+1,r+1)
else:
  print(-1,-1)


'''