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
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 
import java.util.*;
import java.io.*;
public class codeforces 
{ 
   static class Student{
       int x,y;
        Student(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    static int prime[];
    static void sieveOfEratosthenes(int n) 
    { 
        // Create a boolean array "prime[0..n]" and initialize 
        // all entries it as true. A value in prime[i] will 
        // finally be false if i is Not a prime, else true. 
        int pos=0;
        prime= new int[n+1]; 
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == 0)
            { 
                // Update all multiples of p
                prime[p]=p;
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = p; 
            } 
        } 
    }
static    class Sortbyroll implements Comparator<Student> 
{ 
    // Used for sorting in ascending order of 
    // roll number 
    public int compare(Student c, Student b) 
    { 
        return c.y-b.y;
    } 
} 
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
    static class Edge{
        int a,b;
        Edge(int a,int b){
            this.a=a;
            this.b=b;
        }
    }
    static int parent[];
    static int rank[];
    static int seg[];
    public static void main(String[] args){
        //long sum=0;
        FastReader sc=new FastReader();
        int n,k,i,j,s=0,e=0,max=0;
        n=sc.nextInt();
        k=sc.nextInt();
        int a[]=new int[n];
        for(i=0;i<n;i++)
            a[i]=sc.nextInt();
        i=0;
        j=0;
        HashMap<Integer,Integer>map=new HashMap<>();
        while(j<n){
            if(map.size()>k){
                map.put(a[i],map.get(a[i])-1);
                if(map.get(a[i])==0)
                    map.remove(a[i]);
                ++i;
                continue;
            }
            else if(!map.containsKey(a[j]))
            {map.put(a[j],1);
            ++j;}
            else if(map.containsKey(a[j])){
                map.put(a[j],map.get(a[j])+1);
                ++j;
            }
            if(map.size()<=k){
                if(j-i>max){
                    s=i;
                    e=j;
                    max=j-i;
                }
            }
        }
        ++s;
        while(i<n&&map.size()>k){
            map.put(a[i],map.get(a[i])-1);
            if(map.get(a[i])==0)
                map.remove(a[i]);
            ++i;
        }
        if(n-i>max){
            e=n;
            s=i+1;
        }
        System.out.println(s+" "+e);
}
    static int query(int s,int e,int l,int r,int in){
        if(s>e||s>r|e<l)
            return 0;
        if(s>=l&&e<=r)
            return seg[in];
        return query(s,(s+e)/2,l,r,2*in+1)+query((s+e)/2+1,e,l,r,2*in+2);
    }
    static void update(int s,int e,int l,int r,int in,int val){
        if(s>e||s>r|e<l)
            return ;
        if(s>=l&&e<=r)
        {seg[in]+=val;
         return;
        }
        update(s,(s+e)/2,l,r,2*in+1,val);
        update((s+e)/2+1,e,l,r,2*in+2,val);
        seg[in]=seg[2*in+1]+seg[2*in+2];
    }
 /*static long power(long x, long y, long p) 
{ 
    long res = 1;      // Initialize result 
  
    x = x % p;  // Update x if it is more than or  
                // equal to p 
  
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if ((y & (long)1)%2!=0) 
            res = (res*x) % p; 
  
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x) % p;   
    } 
    return res%p; 
} */
   static int find(int x) 
    { 
        // Finds the representative of the set 
        // that x is an element of 
        while(parent[x]!=x) 
        { 
            // if x is not the parent of itself 
            // Then x is not the representative of 
            // his set,
            x=parent[x];
  
            // so we recursively call Find on its parent 
            // and move i's node directly under the 
            // representative of this set 
        } 
  
        return x; 
    }
    static void union(int x, int y) 
    { 
        // Find representatives of two sets 
        int xRoot = find(x), yRoot = find(y); 
  
        // Elements are in the same set, no need 
        // to unite anything. 
        if (xRoot == yRoot) 
            return; 
  
         // If x's rank is less than y's rank 
        if (rank[xRoot] < rank[yRoot]) 
  
            // Then move x under y  so that depth 
            // of tree remains less 
            parent[xRoot] = yRoot; 
  
        // Else if y's rank is less than x's rank 
        else if (rank[yRoot] < rank[xRoot]) 
  
            // Then move y under x so that depth of 
            // tree remains less 
            parent[yRoot] = xRoot; 
  
        else // if ranks are the same 
        { 
            // Then move y under x (doesn't matter 
            // which one goes where) 
            parent[yRoot] = xRoot; 
  
            // And increment the the result tree's 
            // rank by 1 
            rank[xRoot] = rank[xRoot] + 1; 
        } 
    } 
    static long gcd(long a, long b) 
    { 
        if (a == 0) 
            return b; 
        return gcd(b % a, a); 
    }
}