#d2745. 真假字符串

真假字符串

True or False String

Problem Description

Given two strings S1,S2S_1, S_2 of equal length, determine whether there exists a string SS such that deleting exactly one character from SS yields S1S_1, and deleting exactly one character from SS (possibly at a different position) also yields S2S_2.

Input Format

The first line gives the string S1S_1, and the second line gives S2S_2. The length of each string satisfies 1≤len≤3000001 \leq \mathit{len} \leq 300000.

Output Format

If such a string SS exists, output 11; otherwise output 00.

Sample Input

abacaa
aacaba

Sample Output

1

Sample Explanation

abacaba yields S1S_1 after deleting the second character b, and yields S2S_2 after deleting the first character b.