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.
The first line contains line *s* (1 ≤ |*s*| ≤ 2·10<sup class="upper-index">5</sup>), consisting of uppercase and lowercase English letters — the text of Tanya's message.

The second line contains line *t* (|*s*| ≤ |*t*| ≤ 2·10<sup class="upper-index">5</sup>), consisting of uppercase and lowercase English letters — the text written in the newspaper.

Here |*a*| means the length of the string *a*.
"""
abacaba
AbaCaBA
"""
tanya = input()
dict_tan = {}
news = input()
dict_news = {}

# tinh so lan xuat hien cua moi chu cai Tanya can
for i in range(len(tanya)):
    if tanya[i] not in dict_tan:
        dict_tan[tanya[i]] = 1
    else:
        dict_tan[tanya[i]] += 1

# tinh so lan xuat hien cua moi chu cai trong newspaper
for i in range(len(news)):
    if news[i] not in dict_news:
        dict_news[news[i]] = 1
    else:
        dict_news[news[i]] += 1

# tinh so yay
yay = 0
for key in dict_tan.keys():
    if key in dict_news:
        remain = dict_news[key] - dict_tan[key]

        if remain >= 0: # du cho dict_tan
            yay += dict_tan[key]
            dict_tan[key] = 0 # du het roi
            dict_news[key] -= dict_tan[key] # nhung thu con lai de dung

        elif remain < 0: #ko du cho dict_tan
            yay += dict_news[key]
            dict_news[key] = 0 # lay het ra dung
            dict_tan[key] -= dict_news[key] # nhung thu van can phai xet

# tinh so whoop
whoops = 0
# 65 <= upper <= 90  >>>>> chr(ord(key) + 32) de bien thanh lower case
# 97 <= lower <= 122 >>>>> chr(ord(key) - 32) de bien thanh upper case
for key in dict_tan.keys():
    if dict_tan[key] != 0:  # nhung chu cai van can dc xet
        # lay chu cai khac case o dict_news ra de
        if key.isupper():
            dif_case_key = key.lower()
        elif key.islower(): # lower
            dif_case_key = key.upper() # thanh upper case

        if dif_case_key in dict_news and dict_news[dif_case_key] > 0: #neu chu cai nay co o trong dict_new va co nhieu hon 0
            remain = dict_news[dif_case_key] - dict_tan[key]

            if remain >= 0:  # du cho dict_tan
                whoops += dict_tan[key]

            elif remain < 0:  # ko du cho dict_tan
                whoops += dict_news[dif_case_key]

print(yay, whoops)





	  		 			    		   		 			   			