3164. Find the Number of Good Pairs II

You are given 2 integer arrays

`nums1`

and`nums2`

of lengths`n`

and`m`

respectively. You are also given apositiveinteger`k`

.A pair

`(i, j)`

is calledgoodif`nums1[i]`

is divisible by`nums2[j] * k`

(`0 <= i <= n - 1`

,`0 <= j <= m - 1`

).Return the total number of

goodpairs.