For matrices $X,Y\in [0,1]^{n\times m}$, for n > m, is there a square matrix $W\in R^{n\times n}$ so that $X^TWY$ is diagonal if and only if $Y = X$? Furthermore, $X$ and $Y$ are column normalized so that $X1\_m = Y1\_m = 1\_m$, where $1\_m$ is the m-length column vector with all entries equal to 1. 

I know that if $X$ and $Y$ are binary, then $W=I$.