The array a with n integers is given. Let's call the sequence of one or more consecutive elements in a segment. Also let's call the segment k-good if it contains no more than k different values.

Find any longest k-good segment.

As the input/output can reach huge size it is recommended to use fast input/output methods: for example, prefer to use scanf/printf instead of cin/cout in C++, prefer to use BufferedReader/PrintWriter instead of Scanner/System.out in Java.

Input

The first line contains two integers n, k (1 ≤ k ≤ n ≤ 5·105) — the number of elements in a and the parameter k.

The second line contains n integers ai (0 ≤ ai ≤ 106) — the elements of the array a.

Output

Print two integers l, r (1 ≤ l ≤ r ≤ n) — the index of the left and the index of the right ends of some k-good longest segment. If there are several longest segments you can print any of them. The elements in a are numbered from 1 to n from left to right.

Examples

Input

5 5
1 2 3 4 5


Output

1 5


Input

9 3
6 5 1 2 3 2 1 4 5


Output

3 7


Input

3 1
1 2 3


Output

1 1
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
template <class T, class U>
inline void add_self(T &a, U b) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
}
template <class T, class U>
inline void min_self(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void max_self(T &x, U y) {
  if (y > x) x = y;
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  cout << t;
  ;
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
template <class T, class U>
void print_m(const map<T, U> &m, int w = 3) {
  if (m.empty()) {
    cout << "Empty" << endl;
    return;
  }
  for (auto x : m) cout << "(" << x.first << ": " << x.second << ")," << endl;
  cout << endl;
}
template <class T, class U>
void debp(const pair<T, U> &pr, bool end_line = 1) {
  cout << "{" << pr.first << " " << pr.second << "}";
  cout << (end_line ? "\n" : ", ");
}
template <class T>
void print_vp(const T &vp, int sep_line = 0) {
  if (vp.empty()) {
    cout << "Empty" << endl;
    return;
  }
  if (!sep_line) cout << "{ ";
  for (auto x : vp) debp(x, sep_line);
  if (!sep_line) cout << "}\n";
  cout << endl;
}
template <typename T>
void print(const T &v, bool show_index = false) {
  int w = 2;
  if (show_index) {
    for (int i = 0; i < int((v).size()); i++) cout << setw(w) << i << " ";
    cout << endl;
  }
  for (auto &el : v) cout << setw(w) << el << " ";
  cout << endl;
}
template <typename T>
void print_vv(const T &vv) {
  if (int((vv).size()) == 0) {
    cout << "Empty" << endl;
    return;
  }
  int w = 3;
  cout << setw(w) << " ";
  for (int j = 0; j < int((*vv.begin()).size()); j++)
    cout << setw(w) << j << " ";
  cout << endl;
  int i = 0;
  for (auto &v : vv) {
    cout << i++ << " {";
    for (auto &el : v) cout << setw(w) << el << " ";
    cout << "},\n";
  }
  cout << endl;
}
const int nax = 1e6 + 10;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  while (cin >> n >> k) {
    vector<int> a(n);
    for (int i = 0; i < int(n); i++) cin >> a[i];
    int distinct = 0;
    vector<int> cnt(nax);
    int l = 0, r = 0;
    int mx_len = 0;
    int ans_l = 0, ans_r = 0;
    while (r < n && distinct < k) {
      int j = r;
      while (j < n && a[j] == a[r]) ++j;
      cnt[a[r]]++;
      if (cnt[a[r]] == 1) distinct++;
      r = j;
    }
    ans_l = l, ans_r = r - 1;
    mx_len = r;
    while (r < n) {
      while (r < n && cnt[a[r]] > 0) {
        int j = r;
        while (j < n && a[r] == a[j]) {
          ++j;
        }
        cnt[a[r]]++;
        r = j;
      }
      if (distinct == k)
        if (r - l > mx_len) {
          mx_len = r - l;
          ans_l = l, ans_r = r - 1;
        }
      int j = l;
      while (j < n && a[l] == a[j]) ++j;
      cnt[a[l]]--;
      if (cnt[a[l]] == 0) --distinct;
      l = j;
      while (r < n && distinct < k) {
        int j = r;
        while (j < n && a[j] == a[r]) ++j;
        cnt[a[r]]++;
        if (cnt[a[r]] == 1) distinct++;
        assert(distinct == k);
        if (j - l > mx_len) {
          mx_len = j - l;
          ans_l = l, ans_r = j - 1;
        }
        r = j;
      }
    }
    cout << ans_l + 1 << " " << ans_r + 1 << endl;
  }
  return 0;
}
