The diagonal of the square will be its greatest dimension....itf this is less than the diameter of the circle, it will fit
The sides of the square are the legs of a right triangle....so...by Pythagoras
Diagonal = √ [ 5^2 + 5^2 ] = √50 ≈ 7.07 units
So...it fits !!!!