#include <bits/stdc++.h>
int i, j, r[2];
char a[5], b[5];
void p() {
  for (i = r[0] = 0; i < 4; i++) a[i] == b[i] ? r[0]++ : 0;
  printf("%d ", r[0]);
}
void q() {
  for (i = r[1] = 0; i < 4; i++)
    for (j = 0; j < 4; j++) a[i] == b[j] ? r[1]++ : 0;
  printf("%d\n", r[1] - r[0]);
}
int main() {
  for (; ~scanf("%s%s", &a, &b) != 0; p(), q())
    ;
  return 0;
}
