one = input()
two = input()
first = sorted(list(one))
second = sorted(list(two))
i = 0
while first[i] == second[i]:
    i += 1
xs1 = len(first) - i
xs2 = len(second) - i
print(i)
print(xs1)
print(xs2)
print(xs1 + xs2)

768ec03412ff8f8685a816191dc087e1fba6baf4
<mask token>

<mask token>
while first[i] == second[i]:
    i += 1
<mask token>
print(i)
print(xs1)
print(xs2)
print(xs1 + xs2)

one = input()
two = input()
first = sorted(list(one))
second = sorted(list(two))
i = 0
while first[i] == second[i]:
    i += 1
xs1 = len(first) - i
xs2 = len(second) - i
print(i)
print(xs1)
print(xs2)
print(xs1 + xs2)
