for q in range(12000):

    a, b = input().split()

    if a[0] is '0' and b[0] is '0':

        break



    hit = sum(1 for c, d in zip(a, b) if d is c)

    blow = sum(1 for e in b if e in a) - hit

    print((hit, blow))
while True:

    a, b = input().split()

    if a[0] is '0' and b[0] is '0':

        break

 

    hit = sum(1 for c, d in zip(a, b) if d is c)

    blow = sum(1 for e in b if e in a) - hit

    print((hit, blow))
for q in range(12000):
    a, b = input().split()
    if a[0] is "0" and b[0] is "0":
        break
    hit = sum(1 for c, d in zip(a, b) if d is c)
    blow = sum(1 for e in b if e in a) - hit
    print((hit, blow))

while True:
    a, b = input().split()
    if a[0] is "0" and b[0] is "0":
        break
    hit = sum(1 for c, d in zip(a, b) if d is c)
    blow = sum(1 for e in b if e in a) - hit
    print((hit, blow))

-for q in range(12000): +while True: