Packing two different circles in a rectangle Given the dimension of a rectangle and radii of two circles, how can I decide if these two circles can fit in the rectangle?

I don't know if there is a formula to compute such a thing!

thank you :)
In the figure below, let circle $E$ have radius $r_1$, circle $G$ have radius $r_2$ and the rectangle be $H$ high and $W$ wide.  You get the best fit by putting the circles in opposite corners.  First you need $H,W \gt 2r_1, 2r_2$ or one of the circles won't fit all by itself.  Then the coordinates of $E$ are $(r_1,H-r_1)$ and the coordinates of $G$ are $(W-r_2,r_2)$.  You need them to be at least $r_1+r_2$ apart, so the requirement is $$\sqrt{(W-r_1-r_2)^2+(H-r_1-r_2)^2} \gt r_1+r_2$$
To pack two circles tightly together is to touch them tangently.  The rectangle must be as wide as the longer diameter and the longer side as long as the sum of the diameters.

So if circle one  has diameter = $d_1$ and circle two has diameter = $d_2$ and $d_1 \ge d_2$ and the rectangle has sides $l$ and $w$ and $l \ge w$, then the two circles will fit if $d_1 \le w$ and $d_1 + d_2 \le l$.