Matrix operations - equivalent operation for a given operation

This is the given problem, I need to write a code for this:

$(M*Q) \circ (N*Q)$

where $M,Q,N$ are known matrices, "$\ast$" denotes matrix multiplication and "$\circ$" denotes elementwise division.

Dimensions of the matrices: \begin{align*} M: &a\times l,\\ N: &a\times l,\\ Q: &l\times1. \end{align*}

By element-wise division, I mean this:

$A \circ B = C$ where $C_{ij} = A_{ij}/B_{ij} \ \ \forall\ i,j$.

I want to convert this above problem to this:

Find $K$ such that $K*Q = (M*Q) \circ (N*Q)$.

-

In general, this is impossible because $(M*Q) \circ (N*Q)$ is a rational function in the entries of $Q$ but $K*Q$ is linear. For instance, consider $M=(1,0),N=(0,1)$ and $Q=\pmatrix{x\\ y}$. Then $(M*Q) \circ (N*Q)=\frac xy$. Surely it is not a linear function in $x$ and $y$.