Dimensional Analysis and wave theory

From Wave theory it is found that the only properties of the wave and the medium that the wave travels across that may determine the speed of propagation of the wave v are the density ρ of the fluid the wave travels across, the wavelength λ of the wave, and the surface tension S of the fluid. Given that k is a dimensionless constant, find the dependence of the velocity of the capillary wave on the density and surface tension of the fluid and the wavelength of the wave using dimensional analysis. I.e., find the values x, y, z in the relation v = k ρx λy Sz.

The answer should be [tex]x=-0.5, y=-0.5, z=0.5[/tex].

3. The attempt at a solution

[tex]v=k \rho^x \lambda^y s^z[/tex]

· λ is the wavelength so it has dimension L.

· ρ is the density which is mass/volume, so it has dimension [tex]\frac{m}{L^3}[/tex].

· S is the tension which is a force, using the formula F=ma we can see that it has dimension [tex]m \frac{L}{T^2}[/tex].

· v is the velocity and has dimension [tex]\frac{L}{T}[/tex].

So

[tex]\frac{L}{T}=(\frac{m}{L^3})^x (L)^y (m\frac{L}{T^2})^z[/tex]

Is this correct so far? And how do I need to continue? I tried multiplying the terms together and then equating it with LHS to figure out the x,y,z but this doesn't seem to work.

From the third one it is clear that z=0.5 (correct answer). Since z=0.5, then from the first equation x=-0.5 (correct answer). The last equation doesn't make any sense because [tex]x \neq 0[/tex]. And the second equation gives y=0.5 but this wrong since y must be -0.5.