Max Palindromic Product

Given a string s, find two non-overlapping palindromic subsequences that maximize the product of their lengths. Each character can belong to at most one subsequence.

Examples
Input: "leetcodecom"
Output: 9
Hints

Max Palindromic Product

Given a string s, find two non-overlapping palindromic subsequences that maximize the product of their lengths. Each character can belong to at most one subsequence.