Room has two doors. When only the door number one is open, all the people leave the room in 12 minutes. When only the door number two is open, people leave in 18 minutes. How many minutes does it take to all the people leave the room if both doors are open?