We have

and

We know that is a perfect square, then there’s an integer which

We know that

We should choose 2 factors in which there difference is the smallest. We choose

So we have

Hence, the answer is