C++ || Easy || 5 Lines
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:O(N*M)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfPairs(vector<int>& nums1, vector<int>& nums2, int k) {\n        int n = nums1.size(),m = nums2.size(), cnt=0;\n        for (int i=0; i<n; ++i) {\n            for (int j=0; j<m; ++j) {\n                int x=nums2[j]*k;\n                if(nums1[i]%x == 0) cnt++;\n            }\n        }\n        return cnt;\n    }\n};\n```
['C++']