#include <bits/stdc++.h>   using namespace std;   int a[100001];   int getBound(int start, int dir, int size, int k) {     int cnt = 0;     bool seen[100001];     fill(seen, seen + 100001, false);     for (int i = start; i <= size && i > 0; i += dir) {       if (!seen[a[i]]) cnt++, seen[a[i]] = true;       if (cnt == k) return i;     }     return -1;   }   int main() {     int n, k;     cin >> n >> k;     for (int i = 1; i <= n; i++) cin >> a[i];     int right = getBound(1, 1, n, k);     if (right == -1)       cout << -1 <<     << -1 << endl;     else {       int left = getBound(right, -1, n, k);       cout << left <<     << right << endl;     }     return 0;   }   