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
#include <bits/stdc++.h>
using namespace std;
char alphz[27] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                  's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
float Euclidean(long long x1, long long x2, long long y1, long long y2) {
  return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}
long long GCD(long long a, long long b) { return !b ? a : GCD(b, a % b); }
long long LCM(long long a, long long b) { return (a * b) / GCD(a, b); }
void PrimeFactor(long long n) {
  while (n % 2 == 0) {
    n /= 2;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      n /= i;
    }
  }
  if (n > 2) {
  };
}
bool Is_Square(long long x) {
  long long l = 0, r = x;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (mid * mid == x) return true;
    if (mid * mid > x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
long long Power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = Power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp);
  else
    return (x * temp * temp);
}
bool Is_Prime(int x) {
  if (x == 2)
    return 1;
  else if (x % 2 == 0 || x < 2)
    return 0;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
bool Is_Palin(string s) {
  int i = 0, j = (int)s.size() - 1;
  while (i < j) {
    if (s[i] != s[j]) return 0;
    i++, j--;
  }
  return 1;
}
const int NN = 4e+5;
int seg[NN];
int arr[NN];
void build(int low, int hig, int pos) {
  if (low = hig)
    seg[pos] = arr[low];
  else {
    int mid = low + (hig - low) / 2;
    build(low, mid, pos * 2);
    build(mid + 1, hig, 2 * pos + 1);
    seg[pos] = seg[2 * pos] + seg[2 * pos + 1];
  }
}
void update(int low, int hig, int idx, int val, int pos) {
  if (low == hig)
    arr[idx] += val, seg[pos] += val;
  else {
    int mid = low + (hig - low) / 2;
    if (idx >= low && idx <= mid) {
      update(low, mid, idx, val, 2 * pos);
    } else
      update(mid + 1, hig, idx, val, 2 * pos + 1);
    seg[pos] = seg[2 * pos] + seg[2 * pos + 1];
  }
}
int query(int low, int hig, int l, int r, int pos) {
  if (l > hig || r < low) return 0;
  if (l <= low && hig <= r)
    return seg[pos];
  else {
    int mid = low + (hig - low) / 2;
    int p1 = query(low, mid, l, r, 2 * pos);
    int p2 = query(mid + 1, hig, l, r, 2 * pos + 1);
    return (p1 + p2);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string a, b;
  cin >> a >> b;
  int ans1 = 0, ans2 = 0;
  vector<int> up(26), low(26);
  vector<int> upp(26), loww(26);
  vector<bool> doneUP(26, 0), doneLow(26, 0);
  for (int i = 0; i < (int)a.size(); i++) {
    if (isupper(a[i]))
      up[a[i] - 'A']++;
    else
      low[a[i] - 'a']++;
  }
  for (int i = 0; i < (int)b.size(); i++) {
    if (isupper(b[i]))
      upp[b[i] - 'A']++;
    else
      loww[b[i] - 'a']++;
  }
  for (int i = 0; i < (int)a.size(); i++) {
    if (isupper(a[i]) && !doneUP[a[i] - 'A']) {
      int cnt = upp[a[i] - 'A'];
      int cnt2 = up[a[i] - 'A'];
      if (cnt >= cnt2)
        ans1 += cnt2, upp[a[i] - 'A'] -= cnt2, up[a[i] - 'A'] = 0;
      else
        ans1 += cnt, upp[a[i] - 'A'] = 0, up[a[i] - 'A'] -= cnt;
      doneUP[a[i] - 'A'] = 1;
    } else if (islower(a[i]) && !doneLow[a[i] - 'a']) {
      int cnt = low[a[i] - 'a'];
      int cnt2 = loww[a[i] - 'a'];
      if (cnt2 >= cnt)
        ans1 += cnt, loww[a[i] - 'a'] -= cnt, low[a[i] - 'a'] = 0;
      else
        ans1 += cnt2, loww[a[i] - 'a'] = 0, low[a[i] - 'a'] -= cnt2;
      doneLow[a[i] - 'a'] = 1;
    }
  }
  for (int i = 0; i < (int)a.size(); i++) {
    if (isupper(a[i])) {
      int cnt2 = up[a[i] - 'A'];
      char c = tolower(a[i]);
      int cnt = loww[c - 'a'];
      if (cnt and cnt2) ans2++, loww[c - 'a']--, up[a[i] - 'A']--;
    } else {
      int cnt2 = low[a[i] - 'a'];
      char c = toupper(a[i]);
      int cnt = upp[c - 'A'];
      if (cnt and cnt2) ans2++, upp[c - 'A']--, low[a[i] - 'a']--;
    }
  }
  cout << ans1 << " " << ans2 << '\n';
  return 0;
}
