Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided to cut out the letters and glue them into the postcard to achieve string s. The newspaper contains string t, consisting of uppercase and lowercase English letters. We know that the length of string t greater or equal to the length of the string s.

The newspaper may possibly have too few of some letters needed to make the text and too many of some other letters. That's why Tanya wants to cut some n letters out of the newspaper and make a message of length exactly n, so that it looked as much as possible like s. If the letter in some position has correct value and correct letter case (in the string s and in the string that Tanya will make), then she shouts joyfully "YAY!", and if the letter in the given position has only the correct value but it is in the wrong case, then the girl says "WHOOPS".

Tanya wants to make such message that lets her shout "YAY!" as much as possible. If there are multiple ways to do this, then her second priority is to maximize the number of times she says "WHOOPS". Your task is to help Tanya make the message.

Input

The first line contains line s (1 ≤ |s| ≤ 2·105), consisting of uppercase and lowercase English letters — the text of Tanya's message.

The second line contains line t (|s| ≤ |t| ≤ 2·105), consisting of uppercase and lowercase English letters — the text written in the newspaper.

Here |a| means the length of the string a.

Output

Print two integers separated by a space:

  * the first number is the number of times Tanya shouts "YAY!" while making the message, 
  * the second number is the number of times Tanya says "WHOOPS" while making the message. 

Examples

Input

AbC
DCbA


Output

3 0


Input

ABC
abc


Output

0 3


Input

abacaba
AbaCaBA


Output

3 4
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;
 public class A{

    static FastReader scan=new FastReader();
   public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
  

long  get( long x){
    return x*(x-1)/2;
}
static boolean prime[];
 static void sieve(int n) 
    { 
        
        prime = new boolean[n+1]; 
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
           
            if(prime[p] == true) 
            { 
                
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 
          
        
    } 
public static boolean areSame(int arr[])
    {
        // Put all array elements in a HashSet
        Set<Integer>s=new HashSet<Integer>();
        for(int i=0;i<arr.length;i++)
            s.add(arr[i]);

 
        // If all elements are same, size of
        // HashSet should be 1. As HashSet contains only distinct values.
        return (s.size() == 1);
    }
    public static boolean checkType(int arr[], int n)  
    {    
          
        for(int i=1;i<n;i++)if(arr[i]>=arr[i-1])
            return false;
        return true;
    } 
 
   static int LCM(int a,int b){
    return (Math.abs(a*b))/gcd(a,b);
   }
   static  int freq[];
   static int nCr(int n, int r) 
{
    int f=0;
    for(int i=0;i<(int)1e5;i++)
    {
        f+=(freq[i]>1?freq[i]:0);
    }
    return fact(n) / (fact(r) * 
                  fact(n - r))*f; 
} 
  
// Returns factorial of n 
static int fact(int n) 
{ 
    int res = 1; 
    for (int i = 2; i <= n; i++) 
        res = res * i; 
    return res; 
}
static int gcd(int x,int y){
    if(x==0)
        return y;
    return gcd(y%x,x);
} 


static double dis(double x1,double y1,double x2,double y2)
{
    return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}


static int arr[]={1,4,8,30,40,45,65};
static int x=9;
static boolean TLE(int i)
{
    if(arr[i]<=x)
        return true;
    return false;
}
 static void reverse(Integer a[]) 
    { 
        Collections.reverse(Arrays.asList(a)); 
//System.out.println(Arrays.asList(a)); 
    }
    static int res=0;
    static int n;
    static LinkedList<Integer>edges[];
   static int level[];

   public static int getFirstSetBitPos(int n)
    {
        return (int)((Math.log10(n & -n)) / Math.log10(2));
    }
public static void main(String[] args)  throws Exception 
{
ArrayList<Character>rem=new ArrayList<Character>();
 String t=scan.next();
 String s=scan.next();  
int arr[]=new int[265];
for(int i=0;i<s.length();i++)
    {
        arr[s.charAt(i)]++;
}
int yay=0,whoops=0;
for(int i=0;i<t.length();i++)
{
    if(arr[t.charAt(i)]>0){
        yay++;
        arr[t.charAt(i)]--;
    }
    else rem.add(t.charAt(i));
}
for(char ch:rem){
    if(ch>='a'&&ch<='z')
    {
        char to=Character.toUpperCase(ch);
        if(arr[to]>0)
        {
            //out.println("FUCK");
            arr[to]--;
            whoops++;
        }
    }
    else {
        char to=Character.toLowerCase(ch);
        if(arr[to]>0)
        {
            arr[to]--;
            whoops++;
        }
    }
}
out.println(yay+" "+whoops);

 out.close();
    
}

 public static  long pow(long b, long e) {
            long r = 1;
            while (e > 0) {
                if (e % 2 == 1) r = r * b ;
                b = b * b;
                e >>= 1;
            }
            return r;
        }

static long ceil(long a, long b) {
        return (a+b-1)/b;
    }
     static long powMod(long base, long exp, long mod) {
       if (base == 0 || base == 1) return base;
       if (exp == 0) return 1;
       if (exp == 1) return base % mod;
       long R = powMod(base, exp/2, mod) % mod;
       R *= R;
       R %= mod;
       if ((exp & 1) == 1) {
           return base * R % mod;
       }
       else return R % mod;
   }
private static void sort(long[] arr) {
        List<Long> list = new ArrayList<>();
        for (long object : arr) list.add(object);
        Collections.sort(list);
        for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
    }
 public static class FastReader {
        BufferedReader br;
        StringTokenizer root;
        
 
        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (root == null || !root.hasMoreTokens()) {
                try {
                    root = new StringTokenizer(br.readLine());
                } catch (Exception addd) {
                    addd.printStackTrace();
                }
            }
            return root.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (Exception addd) {
                addd.printStackTrace();
            }
            return str;
        }
         public int[] nextIntArray(int arraySize) {
            int array[] = new int[arraySize];
 
            for (int i = 0; i < arraySize; i++) {
                array[i] = nextInt();
            }
 
            return array;
        }
}
public static class Pair{
        public long x, y;
        public Pair(long x1, long y1) {
            x=x1;
            y=y1;
        }
        @Override
        public int hashCode() {
            return (int)(x + 31 * y);
        }
        public String toString() {
            return x + " " + y;
        }
        @Override
        public boolean equals(Object o){
            if (o == this) return true;
            if (o.getClass() != getClass()) return false;
            Pair t = (Pair)o;
            return t.x == x && t.y == y;
        }
static class pair implements Comparable<pair>{
    double i;
    double j;
pair(double i,double j){
    this.i=i;
    this.j=j;
}
pair(){}
public int compareTo(pair o)
{
    int result = Double.compare(i, o.i);
         if ( result == 0 ) {
           // both X are equal -> compare Y too
           result = Double.compare(j, o.j);
         } 
         return result;
      }
}}}






