a = input()
b = input()
d = 0
for i in range(len(a)):
if a[i] != b[i]:
d += 1
if a[0] == b[0] and a[-1] == b[-1] and d <= 1:
print(1)
else:
print(0)
set(map(int, input().split()))
그 다음, 교집합과 합집합을 각각 집합 연산을 이용해 구한 다음, sorted를 통해 정렬된 리스트로 만들자
단, 교집합이 비어있다면 empty를 출력해야 하므로 까먹지 말자
a = set(map(int, input().split()))
b = set(map(int, input().split()))
c = sorted(a & b)
d = sorted(a | b)
if not c:
print('empty')
else:
for i in c:
print(i, end=' ')
print()
for i in d:
print(i, end=' ')