Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vb = vector<bool>;
using vc = vector<char>;
using vvc = vector<vc>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vpii = vector<pii>;
using vpll = vector<pll>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vull = vector<ull>;
constexpr int INF = 2000000000;
constexpr ll INFl = 2000000000ll;
constexpr ll INFll = 2000000000000000000ll;
constexpr ll mod = 1e9 + 7;
struct num {
  num(ll val = 0) : v{val} {
    if (v >= mod) v %= mod;
  };
  ll v;
  operator ll() { return v; };
  num operator+(const num& o) const { return {v + o.v}; };
  num operator-(const num& o) const { return {v - o.v + mod}; };
  num operator*(const num& o) const { return {v * o.v}; };
  num operator+=(const num& o) {
    v = num{v + o.v};
    return *this;
  };
  num operator-=(const num& o) {
    v = num{v - o.v + mod};
    return *this;
  };
  num operator*=(const num& o) {
    v = num{v * o.v};
    return *this;
  };
  num operator!() const {
    num R = 1;
    for (__typeof(v + 1) i = (2); i <= (v + 1); ++i) R *= num{i};
    return R;
  }
  num operator^(ll b) const {
    num R{1}, a{v};
    while (b > 0) {
      if (b & 1) R *= a;
      a *= a, b /= 2;
    }
    return R;
  }
  num operator/(const num& o) const { return (*this) * (o ^ (mod - 2)); }
};
ostream& operator<<(ostream& os, pii& x) {
  os << '(' << x.first << ' ' << x.second << ')';
  return os;
}
istream& operator>>(istream& is, pii& x) {
  is >> x.first >> x.second;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& x) {
  for (T& i : x) os << i << ' ';
  return os;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& x) {
  for (T& i : x) is >> i;
  return is;
}
pii operator+(const pii& A, const pii& B) {
  return {A.first + B.first, A.second + B.second};
}
pii operator-(const pii& A, const pii& B) {
  return {A.first - B.first, A.second - B.second};
}
pii operator-(const pii& A) { return {-A.first, -A.second}; }
template <typename T>
bool maxe(T& A, const T& B) {
  if (B > A) {
    A = B;
    return 1;
  }
  return 0;
}
template <typename T>
bool mine(T& A, const T& B) {
  if (B < A) {
    A = B;
    return 1;
  }
  return 0;
}
int n, k;
vi T;
vi A(1000 * 1000, 0);
bool in() {
  cin >> n >> k;
  T.resize(n);
  cin >> T;
  return true;
}
int ile = 0;
void dodaj(int x) {
  if (A[T[x]] == 0) ++ile;
  A[T[x]]++;
}
void usun(int x) {
  A[T[x]]--;
  if (A[T[x]] == 0) --ile;
}
ll solve() {
  int R = 0;
  int j = 0;
  pii r = {1, 1};
  for (__typeof(n - 1) i = (0); i <= (n - 1); ++i) {
    dodaj(i);
    while (ile > k) usun(j++);
    if (maxe(R, i - j)) r = {j + 1, i + 1};
  }
  cout << r.first << " " << r.second << "\n";
  return -INF;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int noOfTests = 1;
  while (noOfTests-- > 0) {
    if (!in()) {
      cout << "popsute wejscie\n";
      continue;
    }
    ll result = solve();
    if (result == ll(-'t'))
      cout << "TAK\n";
    else if (result == ll(-'n'))
      cout << "NIE\n";
    else if (result == ll(-'e'))
      cout << "Popsute\n";
    else if (result != -INF)
      cout << result << '\n';
  }
  return 0;
}