Problem
Given $2$ strings, write a program to find the longest string that is contained in both strings, and report its length.
Here, a string $s$ is said to be contained in a string $t$ if $s$ appears contiguously in $t$. The empty string, that is, the string of length $0$, is contained in every string. For example, the string ABRACADABRA contains the following strings: ABRA, RAC, D, ACADABRA, ABRACADABRA, the empty string, and so on. On the other hand, the string ABRACADABRA does not contain the following strings: ABRC, RAA, BA, K, and so on.
Examples
Example $1$: When ABRACADABRA and ECADADABRBCRDARA are given as the strings, the strings contained in both include CA, CADA, ADABR, the empty string, and so on. Among them, the longest one is ADABR, and its length is $5$. The positions of ADABR contained in the $2$ strings are shown in Figure $2\text{-}1$.
$$\begin{aligned} \texttt{ABRAC}&\underline{\texttt{ADABR}}\texttt{A} \\ \texttt{ECAD}&\underline{\texttt{ADABR}}\texttt{BCRDARA} \end{aligned}$$
Figure $2\text{-}1$: Positions of ADABR appearing in the strings of Example $1$
Example $2$: When UPWJCIRUCAXIIRGL and SBQNYBSBZDFNEV are given as the strings, the only string contained in both is the empty string, and its length is $0$.
Input
The input consists of $2$ lines: the $1$-st string is given on the $1$-st line, and the $2$-nd string is given on the $2$-nd line. Each string consists of uppercase English letters, and the length of each string is at least $1$ and at most $4\,000$.
Of the test data, for $30\%$ of the score, the length of each string is at least $1$ and at most $50$.
Output
Print $1$ line containing only the length of the longest string contained in both of the $2$ given strings.
Sample Input and Output
The inputs and outputs corresponding to the examples are as follows.
Sample Input 1
ABRACADABRA ECADADABRBCRDARA
Sample Output 1
5
Sample Input 2
UPWJCIRUCAXIIRGL SBQNYBSBZDFNEV
Sample Output 2
0