There are n left boots and n right boots. Each boot has a color which is denoted as a lowercase Latin letter or a question mark ('?'). Thus, you are given two strings l and r, both of length n. The character l_i stands for the color of the i-th left boot and the character r_i stands for the color of the i-th right boot.

A lowercase Latin letter denotes a specific color, but the question mark ('?') denotes an indefinite color. Two specific colors are compatible if they are exactly the same. An indefinite color is compatible with any (specific or indefinite) color.

For example, the following pairs of colors are compatible: ('f', 'f'), ('?', 'z'), ('a', '?') and ('?', '?'). The following pairs of colors are not compatible: ('f', 'g') and ('a', 'z').

Compute the maximum number of pairs of boots such that there is one left and one right boot in a pair and their colors are compatible.

Print the maximum number of such pairs and the pairs themselves. A boot can be part of at most one pair.

Input

The first line contains n (1 ≤ n ≤ 150000), denoting the number of boots for each leg (i.e. the number of left boots and the number of right boots).

The second line contains the string l of length n. It contains only lowercase Latin letters or question marks. The i-th character stands for the color of the i-th left boot.

The third line contains the string r of length n. It contains only lowercase Latin letters or question marks. The i-th character stands for the color of the i-th right boot.

Output

Print k — the maximum number of compatible left-right pairs of boots, i.e. pairs consisting of one left and one right boot which have compatible colors.

The following k lines should contain pairs a_j, b_j (1 ≤ a_j, b_j ≤ n). The j-th of these lines should contain the index a_j of the left boot in the j-th pair and index b_j of the right boot in the j-th pair. All the numbers a_j should be distinct (unique), all the numbers b_j should be distinct (unique).

If there are many optimal answers, print any of them.

Examples

Input


10
codeforces
dodivthree


Output


5
7 8
4 9
2 2
9 10
3 1


Input


7
abaca?b
zabbbcc


Output


5
6 5
2 3
4 6
7 4
1 2


Input


9
bambarbia
hellocode


Output


0


Input


10
code??????
??????test


Output


10
6 2
1 6
7 3
3 5
4 8
9 7
5 1
2 4
10 9
8 10
// @jagrit_07
import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;

public class Main {
    
	public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n = sc.nextInt();
        char ch1[] = sc.next().toCharArray();
        char ch2[] = sc.next().toCharArray();
        
        Stack<Integer> i1[] = new Stack[27];
        Stack<Integer> i2[] = new Stack[27]; //indexs of 2nd array;
        
        for(int i=0;i<27;i++)
        {
            i1[i] = new Stack<Integer>();
            i2[i] = new Stack<Integer>();
        }
        
        //Adding indexes;
        for(int i=0;i<n;i++)
        {
            if(ch1[i]=='?' && ch2[i]=='?')
            {
                //26 is for '?'
                i1[26].add(i+1);
                i2[26].add(i+1);
                continue;
            }
            if(ch1[i]=='?')
            {
                i1[26].add(i+1);
                i2[ch2[i]-'a'].add(i+1);
                continue;
            }
            if(ch2[i]=='?')
            {
                i1[ch1[i]-'a'].push(i+1);
                i2[26].add(i+1);
                continue;
            }
            i1[ch1[i]-'a'].push(i+1);
            i2[ch2[i]-'a'].add(i+1);
        }
        
        //Now matching;
        List<String> list = new ArrayList<>();
     //   System.out.println(Arrays.toString(i2[26].toArray()));
       // System.out.println(Arrays.toString(i1[26].toArray()));
        for(int i=0;i<26;i++)
        {
//System.out.println(Arrays.toString(i2[i].toArray()));
            Stack<Integer> s1 = i1[i]; //I have hs1 indexs;
            Stack<Integer> s2 = i2[i];
            while(s1.size()>0 && s2.size()>0)
            {
                String s = s1.pop() + " " + s2.pop();
                list.add(s);
            }
        }
       // System.out.println(Arrays.toString(list.toArray()));
        //matchin ques of 1 with vals of 2;
        if(i1[26]!=null && i1[26].size()>0)
        {
            for(int i=0;i<26;i++)
            {
                while(i1[26].size()>0 && i2[i].size()>0)
                {
                    String s = i1[26].pop() + " " + i2[i].pop();
                    list.add(s);
                }
            }
        }
        //System.out.println(Arrays.toString(list.toArray()));
        //match ques of 2 with vals of 1;
        if(i2[26]!=null && i2[26].size()>0)
        {
            for(int i=0;i<26;i++)
            {
                while(i2[26].size()>0 && i1[i].size()>0)
                {
                    String s = i1[i].pop() + " " + i2[26].pop();
                    list.add(s);
                }
            }
        }
        
        //System.out.println(Arrays.toString(list.toArray()));
        //Matching ques with ques;
        if(i2[26]!=null && i1[26]!=null)
        {
            while(i2[26].size()>0 && i2[26].size()>0)
                {
                    String s = i1[26].pop() + " " + i2[26].pop();
                    list.add(s);
                }
        }
        System.out.println(list.size());
        //printList(list);
        StringBuffer bf = new StringBuffer("");
        for(String s: list)
        {
            bf.append(s+"\n");
        }
        System.out.println(bf.toString());
        //System.out.println(Arrays.toString(list.toArray()));
        
        
    }


    public static int bs(int num[], long x)
    {
        int low=0;
        int high=num.length-1;
        int ans=-1;
        while(low<=high)
        {
            int mid = low + (high-low)/2;
            if(num[mid]==x)
            {
                ans = mid;
                //break;
                low = mid+1;
            }
            else if(num[mid]<x)
            {
               // ans=mid;
                ans = mid;
                low=mid+1;
            }
            else
            {
                //ans=mid;
                high=mid-1;
            }
        }
        return ans;
    }
    
    
    
    
    
    
    
    
    
    public static List<Integer> solve(char ch[], int split)
    {
        long sum = 0;
        List<Integer> l1 = new ArrayList<>();
        for(int i=0;i<split && i<ch.length;i++)
        {
            l1.add(ch[i]-'0');
        }
        List<Integer> l2 = new ArrayList<>();
        for(int i=split;i<ch.length;i++)
        {
            l2.add(ch[i]-'0');
        }
        //System.out.println(Arrays.toString(l1.toArray()));
        //System.out.println(Arrays.toString(l2.toArray()));
        int carry = 0;
        int i = l1.size()-1;
        int j = l2.size()-1;
        List<Integer> list = new ArrayList<>();
        while(i>=0 || j>=0)
        {
            int e1 = (i>=0) ? l1.get(i) : 0;
            int e2 = (j>=0) ? l2.get(j) : 0;
            i--;
            j--;
            int e3 = e1 + e2 + carry;
            if(e3>9)
            {
                list.add(e3%10);
                carry = 1;
            }
            else
            {
                list.add(e3);
                carry = 0;
            }
        }
        if(carry>0)
        {
            list.add(1);
        }
       // System.out.println(Arrays.toString(l2.toArray()));
        Collections.reverse(list);
        return list;
    }
    
    //Comparing two list;
    public static List<Integer> comp(List<Integer> l1, List<Integer> l2)
    {
        if(l1.size()<l2.size()) return l1;
        if(l2.size()<l1.size()) return l2;
        
        for(int i=0;i<l1.size();i++)
        {
            if(l1.get(i)<l2.get(i))
            {
                return l1;
            }
            else if(l2.get(i)<l1.get(i))
            {
                return l2;
            }
        }
        return l2;
    }
   
    
   
    
 
    /* to find (x^y)%p in O(log y) */
    static long power(long x, long y, int p) 
    { 
        // Initialize result 
        long ans = 1;      
         
        // Update x if it is more   
        // than or equal to p 
        x = x % p;  
  
       if (x == 0) return 0; // In case x is divisible by p;    
  
        while (y > 0) 
        { 
            if((y & 1)==1) 
            {
                 ans = ((long)(ans * x))% p;    
            }
            y = y >> 1;  //y/2; 
            x = ((long)(x * x) )% p;  
        } 
        return ans; 
    } 
    
    
    
    
    
    public static void printList(List<Integer> list)
    {
        StringBuffer bf = new StringBuffer("");
        for(int i: list) bf.append(i+"\n");
        System.out.println(bf.toString());
    }
    
    
    
    
    
    public static int sum(int a[])
    {
        int sum=0;
        for(int i: a) sum=sum+i;
        return sum;
    }
    
  
    public static int getMax(int a[])
    {
        int m=Integer.MIN_VALUE;
        for(int i: a) m=Math.max(i,m);
        return m;
    }
    
    static class Pair
    {
        int x;
        int y;

        //int i;
        public Pair(int x, int  y)
        {
            this.x=x;
            this.y=y;
        }
    }
    static class Comp implements Comparator<Pair>
    {
        public int compare(Pair p1, Pair p2)
        {
            if(p1.y!=p2.y)
            {
                return p2.y - p1.y;
            }
            return p2.x - p1.x;
        }
    }
    
    
    
    public static int partition(int arr[], int low, int high) 
    { 
        int pivot = arr[high];  
        int i = (low-1);
        for (int j=low; j<high; j++) 
        { 
            if (arr[j] < pivot) 
            { 
                i++; 
                int temp = arr[i]; 
                arr[i] = arr[j]; 
                arr[j] = temp; 
            } 
        } 
        int temp = arr[i+1]; 
        arr[i+1] = arr[high]; 
        arr[high] = temp; 
  
        return i+1; 
    } 
    public static void sort(int arr[], int low, int high) 
    { 
        if (low < high) 
        { 
            int pi = partition(arr, low, high); 
            sort(arr, low, pi-1); 
            sort(arr, pi+1, high); 
        } 
    } 
    
    
    
    
    
    
    static long gcd(long a,long b)
    {
        if(b==0) return a;
        return gcd(b,a%b);
    }
    
    
    static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}
    static void sort(long[] a) {
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}
    
	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 (final 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 (final IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		int[] nextIntArray(final int n) {
			final int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = Integer.parseInt(next());
			}
			return a;
		}

	}	
}
//private ArrayList<String[]> action = new ArrayList<String[]>();


//Templates for Comparator and Classes - @jagrit_07
/*
Arrays.sort(newEmployees, new Comparator<Employee>() {
    @Override
    public int compare(Employee emp1, Employee emp2) {
        return emp1.getName().compareTo(emp2.getName());
    }
});
class Pair
	{
		
		long i; //index;
		long l; //left;
		long c; //cost;
		public Pair(long x,long y,long z)
		{
			this.i=x;
			this.l=y;
			this.c=z;
		}
		public String toString()
		{
			return this.i+" "+this.l+" "+this.c;
		}
	}
class Comp implements Comparator<Pair>
	{
		public int compare(Pair p1, Pair p2)
		{
			if(p1.c!=p2.c)
			{
				return (int)(p1.c-p2.c); //sort acc to cost;
			}
			else{
				return (int)(p1.i-p2.i); //sort acc to index;
			}
			
		}
	}
*/

/*
System.out.println( 
      String.format("%.5f", b)); 
  HashMap - Put template - d.put(a1,d.getOrDefault(a1,0)+1);
  for (Map.Entry<String, Integer> entry : map.entrySet()) {
        System.out.println(entry.getKey() + ":" + entry.getValue());
    }
  Deque<String> deque 
            = new LinkedList<String>();  
            
  List<Integer> c[] = new ArrayList[3];          
*/