Python3 3 liner - Number of Ways Where Square of Number Is Equal to Product of Two Numbers
\nclass Solution:\n    def numTriplets(self, nums1: List[int], nums2: List[int]) -> int:\n        sq1 = Counter(map(mul, nums1, nums1))\n        sq2 = Counter(m
```\nclass Solution:\n    def numTriplets(self, nums1: List[int], nums2: List[int]) -> int:\n        sq1 = Counter(map(mul, nums1, nums1))\n        sq2 = Counter(map(mul, nums2, nums2))\n        return sum(sq2[a * b] for a, b in combinations(nums1, 2)) +  sum(sq1[a * b] for a, b in combinations(nums2, 2))\n```
['Python', 'Python3']