input: Write a Python function that counts the number of unique index pairs (i, j) in a given list of words, such that words[i] is both a prefix and a suffix of words[j], and i is less than j.
  
  
  from typing import List
  from collections import defaultdict
  
  def find_prefix_suffix_pairs(words: List[str]) -> int:
      """
      Given a list of strings, this function returns the count of pairs (i, j) where i is 
      less than j, and the word at index i is both a prefix and suffix of the word at index j.
  
      Examples:
      >>> words = ["a","aba","ababa","aa"]
      4
      >>> words = ["pa","papa","ma","mama"]
      2
      >>> words = ["abab","ab"]
      0
  
      Constraints:
      1 <= len(words) <= 100000
      1 <= len(words[i]) <= 100000
      Each word consists only of lowercase English letters.
      The total length of all words combined does not exceed 500000.
      """
  
output: def find_prefix_suffix_pairs(words: List[str]) -> int:
      count = 0
      for i in range(len(words)):
          for j in range(i + 1, len(words)):
              if words[j].startswith(words[i]) and words[j].endswith(words[i]):
                  count += 1
      return count