Build a perfect square