take the smallest number in the square