Measure (a) the diameter of the circle and (b) the diagonal of the square. If a >= b, it will go in
Actually, the square peg will fit through the circular hole so long as the length of the square's side is less than the hole's diameter ... though you might need to shorten the length of the peg.