You are given a string of lowercase letters. The appearance value of a substring is the number of times it occurs in the string multiplied by its length. Write a program that prints the largest appearance value among all palindrome substrings.
The first line contains a string of lowercase letters (a-z). The length is at most 300,000.
Print the largest appearance value among palindrome substrings on one line.
Let ∣s∣ denote the length of string s. A substring is a non-empty string sisi+1…sj with 1≤i≤j≤∣s∣. A palindrome reads the same from left to right and from right to left. A large appearance value can come from a short substring that appears many times or from a long palindrome that appears once.