You are given a string T. For a string S, let L(S) be the length of S and let C(S) be the number of times S occurs in T. The cost of S is
F(S)=L(S)×C(S)
S occurs in T when S appears as a substring of T. Occurrences may overlap, and two occurrences with different starting positions count separately. For example, with T = aaaaa and S = aaa, the string S occurs 3 times in T, so F(S)=3×3=9.
Find the largest cost among all substrings of T.
The first line contains a string T made up of lowercase letters. The length of T is at least 1 and at most 100,000.
Print, on one line, the maximum value of F(S) over all substrings S of T.