An object is kept at a distance of 16 cm from a thin lens and the image formed is real. If the object is kept at a distance of 6 cm from the same lens, then the image formed is virtual. If the sizes of the image formed are equal, then the focal length of the lens will be