Suffix Tree - Application 3 - Longest Common Substring

hard
Given 2 strings, print the length of longest common substring and print the start points of the same

Input Format

Input consists of 2 lines, each containing a string.

Output Format

Print the length of longest common substring, and all the start points of the same in the next line

Constraints

|S1|,|S2| <= 10^5

Example

Input
pepcoder
xyzcoderpep
Output
5
3 12 
Previous
Suffix Tree - Application 2 - Longest Repeated Substrings
Next
Suffix Tree - Dictionary Queries

Related Questions