In the equation

Ve = sqrt (N m^2/kg^2 kg)/m

With the next step being

Ve = sqrt (N m/kg)

Why do the kg's cancel? I understand why the m's do: They're on opposite sides of the division operator. The kg's however, have me stumped.

An explanation of the involved concept would be helpful...