A diagonal of a square + two of its sides creates a <em>45-45-90 triangle</em>. The relation between the lengths of said triangle is <em>1:1:√2</em>. In this case the diagonal is the √2 of the ratio.
That means that the side length should be <em>18/√2</em>, as this times √2 makes 18.