If the density of the object is uniform then the center of gravity of the rectangle is at the center of the object.
For any object, the way to find the center of gravity is the following:
1. Attach a string to any point on the object then draw a vertical line from that point.
2. Attach the string to another point on the object and draw another vertivcal line.
3. The point where the above two line meet is the center of gravity.
The net torque much be zero for a stable condition.
If the center of the gravity exceeds the base , there is no way to find normal force to balance the torque.