Easy simple code || Beats 90|| O(M*N)|| O(M+N)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def numTriplets(self, nums1: List[int], nums2: List[int]) -> int:\n        dic1=Counter(nums1)\n        dic2=Counter(nums2)\n        def check(nums1,dic):\n            count=0\n            for i in range(len(nums1)):\n                tempdic = dict(dic)\n                for j in tempdic:\n                    temp=nums1[i] ** 2 // j\n                    if temp*j==nums1[i]**2 and temp in tempdic:\n                        if temp==nums1[i] and tempdic[j]==1:\n                            continue\n                        if temp==j and tempdic[temp]>1:\n                            count+=(tempdic[temp]*(tempdic[temp]-1))//2\n                        elif tempdic[temp]>0 and tempdic[j]>0:\n                            count+=tempdic[temp]*tempdic[j]\n                            tempdic[j]=0\n                            print(nums1[i],j,temp)\n\n            return count\n        x=check(nums1,dic2)\n        y=check(nums2,dic1)\n        return x+y\n```
['Array', 'Hash Table', 'Math', 'Counting', 'Python3']