Harry got a string T, he wanted to know the number of T’s disjoint palindrome substring pairs. A string is considered to be palindrome if and only if it reads the same backward or forward. For two substrings of $T: \, x = T[a_1 \ldots b_1], \, y = T[a_2 \ldots b_2]$(where a1 is the beginning index of $x, b_1$ is the ending index of x. $a_2, b_2$ as the same of y), if both x and y are palindromes and $b_1 < a_2 \text{ or } b_2 < a_1$ then we consider (x, y) to be a disjoint palindrome substring pair of T.