Problem: After the fourth season Sherlock and Moriary have realized the whole foolishness of the battle between them and decided to continue their competitions in peaceful game of Credit Cards.

Rules of this game are simple: each player bring his favourite n-digit credit card. Then both players name the digits written on their cards one by one. If two digits are not equal, then the player, whose digit is smaller gets a flick (knock in the forehead usually made with a forefinger) from the other player. For example, if n = 3, Sherlock's card is 123 and Moriarty's card has number 321, first Sherlock names 1 and Moriarty names 3 so Sherlock gets a flick. Then they both digit 2 so no one gets a flick. Finally, Sherlock names 3, while Moriarty names 1 and gets a flick.

Of course, Sherlock will play honestly naming digits one by one in the order they are given, while Moriary, as a true villain, plans to cheat. He is going to name his digits in some other order (however, he is not going to change the overall number of occurences of each digit). For example, in case above Moriarty could name 1, 2, 3 and get no flicks at all, or he can name 2, 3 and 1 to give Sherlock two flicks.

Your goal is to find out the minimum possible number of flicks Moriarty will get (no one likes flicks) and the maximum possible number of flicks Sherlock can get from Moriarty. Note, that these two goals are different and the optimal result may be obtained by using different strategies.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 1000) — the number of digits in the cards Sherlock and Moriarty are going to use.

The second line contains n digits — Sherlock's credit card number.

The third line contains n digits — Moriarty's credit card number.

Output

First print the minimum possible number of flicks Moriarty will get. Then print the maximum possible number of flicks that Sherlock can get from Moriarty.

Examples

Input

3
123
321


Output

0
2


Input

2
88
00


Output

2
0

Note

First sample is elaborated in the problem statement. In the second sample, there is no way Moriarty can avoid getting two flicks.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

//import Number_theory.pair;

public class hacker49 {
	public static int r1=0;
	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 pair{
		private long cnt;
		private long[] fq;
		private long[] pref;
		pair(){
			fq=new long[41];
			pref=new long[41];
			cnt=(long)0;
		}	
	}
	
	public static void main(String[] args) {
		OutputStream outputStream =System.out;
	    PrintWriter out =new PrintWriter(outputStream);
		FastReader s=new FastReader();
        int n=s.nextInt();
        String str1=s.next();
        String str2=s.next();
        int[] a=new int[n];
        for(int i=0;i<n;i++) {
        	a[i]=(int)(str1.charAt(i)-'0');
        }
        TreeMap<Integer,Integer> e=new TreeMap<>();
        TreeMap<Integer,Integer> e2=new TreeMap<>();
        for(int i=0;i<n;i++) {
        	int g=(int)(str2.charAt(i)-'0');
        	if(!e.containsKey(g)) {
        		e.put(g, 1);
        		e2.put(g, 1);
        	}else {
        		e.put(g, e.get(g)+1);
        		e2.put(g, e2.get(g)+1);
        	}
        }
        Arrays.sort(a);
        long ans1=0;
        for(int i=0;i<n;i++) {
        	if(e.ceilingKey(a[i])==null) {
//        		System.out.println(i);
        		ans1+=n-i;
        		break;
        	}else {
        		
        		int h=e.ceilingKey(a[i]);
//        		ans1++;
        		if(e.get(h)==1) {
        			e.remove(h);
        		}else {
        			e.put(h, e.get(h)-1);
        		}
        	}

        }
        long ans2=0;
        
        for(int i=0;i<n;i++) {
        	if(e2.higherKey(a[i])==null) {
        		break;
        	}else {
        		
        		int h=e2.higherKey(a[i]);
        		ans2++;
//        		System.out.println(e.get(h));
        		if(e2.get(h)==1) {
        			e2.remove(h);
        		}else {
        			e2.put(h, e2.get(h)-1);
        		}
        	}
        }
        
        out.println(ans1+" "+ans2);
        		
        out.close();
	}
	
	static long mod=1000000007;
//	for(int i=2;i<=100000;i++) {
		
//	}
	static long[] f=new long[200001];
	static void fac() {
		f[0]=1;
		f[1]=1;
		for(long i=2;i<=200000;i++) {
			f[(int) i]=(i*f[(int) (i-1)])%mod;
		}
	}
	static int get=0;
	static int h=0;
	static void  ans(int b,int sum) {
		if(b==0) {
			if(sum==get) {
				h++;
			}
			return;
		}else {
			ans(b-1,sum+1);
			ans(b-1,sum-1);
			
		}
		
		
	}
	static int lower(char[] b,int n) {
		int l=3;
		int r=n;
//		for(int i=0;i<32;i++) {
		while(r!=l) {
			int mid=(l+r)/2;
			if(good(b,mid)) {
				r=mid;
			}else {
				l=mid+1;
			}
		}
//		}
		if(r==(n)) {
			return 0;
		}else {
			return (r);
		}
	}
	static boolean good(char[] b,int k) {
		int[] a=new int[4];
		int l=1;
		int r=k+1;
//		System.out.println(k);
		int n=b.length;
		for(int i=1;i<=k;i++) {
			a[(int)(b[i]-'0')]++;
		}
		if(a[1]>0 && a[2]>0 && a[3]>0) {
			return true;
		}else {
			boolean p=false;
			while(r<n) {
				a[(int)(b[l]-'0')]--;
				a[(int)(b[r]-'0')]++;
				if(a[1]>0 && a[2]>0 && a[3]>0) {
					p=true;
					break;
				}
//				System.out.println(1);
				l++;
				r++;
			}
			if(p) {
				return true;
			}
			return false;
		}
	}
	static ArrayList<Long> d=new ArrayList<>(); 
	public static long res=1;
	public static void pf(long n) {
		
		 for (long i=1; i<=Math.sqrt(n); i++)
	        {
	            if (n%i==0)
	            {
	                // If divisors are equal, print only one
	                if (n/i == i) {
//	                    System.out.print(" "+ i);
	                	d.add(i);
	                }else { // Otherwise print both
	                    d.add(i);
	                    d.add(n/i);}
	            }
	        }	
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public static void Create(long[] a,pair[] segtree,int low,int high,int pos) {
		if(low>high) {
			return;
		}
		if(low==high) {
			for(int i=1;i<=40;i++) {
				if(i==a[low]) {
					segtree[pos].fq[i]=1;
				}else {
					segtree[pos].fq[i]=0;
				}
				segtree[pos].pref[i]=segtree[pos].fq[i]+segtree[pos].pref[i-1];
			}
			
			return ;
		}
		int mid=(low+high)/2;
		Create(a,segtree,low,mid,2*pos);
		Create(a,segtree,mid+1,high,2*pos+1);
		pair a3=new pair();
		for(int i=1;i<=40;i++) {
			a3.fq[i]=segtree[2*pos].fq[i] +segtree[2*pos+1].fq[i];
			a3.pref[i]=a3.fq[i]+a3.pref[i-1];
		}
		for(int i=1;i<=40;i++) {
		a3.cnt+=segtree[2*pos].fq[i]*segtree[2*pos+1].pref[i-1];
		}
		a3.cnt+=segtree[2*pos].cnt+segtree[2*pos+1].cnt;
		for(int i=1;i<=40;i++) { 
		segtree[pos].fq[i]=a3.fq[i];
		 segtree[pos].pref[i]=a3.pref[i];} 
		segtree[pos].cnt=a3.cnt;
	}
	public static void update(pair[] segtree,int low,int high,int index,int pos,int val) {
		
		if(low==high && low==index) {
			for(int i=1;i<=40;i++) {
				if(i==val) {
					segtree[pos].fq[val]=1;
				}else {
					segtree[pos].fq[i]=0;
				}
				segtree[pos].pref[i]=segtree[pos].fq[i]+segtree[pos].pref[i-1];
			}
			segtree[pos].cnt=(long)0;
			return;
		}
			int mid=(high+low)/2; 
			if(index<=mid) {
			update(segtree,low,mid,index,2*pos,val);}else {
			 update(segtree,mid+1,high,index,2*pos+1,val);}
			pair a3=new pair();
			for(int i=1;i<=40;i++) {
				a3.fq[i]=segtree[2*pos].fq[i] +segtree[2*pos+1].fq[i];
				a3.pref[i]=a3.fq[i]+a3.pref[i-1];
			}
			for(int i=1;i<=40;i++) {
			a3.cnt+=segtree[2*pos].fq[i]*segtree[2*pos+1].pref[i-1];
			}
			a3.cnt+=segtree[2*pos].cnt+segtree[2*pos+1].cnt;
			for(int i=1;i<=40;i++) { 
			segtree[pos].fq[i]=a3.fq[i];
			 segtree[pos].pref[i]=a3.pref[i];} 
			segtree[pos].cnt=a3.cnt;
	}
	public static pair query(pair[] segtree,int low,int high,int qlow,int qhigh ,int pos) {
		if(low>=qlow && high<=qhigh) {
			return segtree[pos];
		}
		if(qhigh<low || qlow>high) {
			return new pair();
		}
		int mid=(low+high)/2;
		
	  pair a1=query(segtree,low,mid,qlow,qhigh,2*pos);
	  pair a2=query(segtree,mid+1,high,qlow,qhigh,2*pos+1);
	  pair a3=new pair();
	  for(int i=1;i<=40;i++) {
			a3.fq[i]=a1.fq[i] +a2.fq[i];
			a3.pref[i]=a3.fq[i]+a3.pref[i-1];
		}
		for(int i=1;i<=40;i++) {
			a3.cnt+=a1.fq[i]*a2.pref[i-1];
		}
		a3.cnt+=a1.cnt+a2.cnt;
	  return a3;
	  
	}
	
	public static long nextPowerOf2(long n) 
	{ 
	    n--; 
	    n |= n >> 1; 
	    n |= n >> 2; 
	    n |= n >> 4; 
	    n |= n >> 8; 
	    n |= n >> 16; 
	    n++;     
	    return n; 
	} 
	}