A witch has two sand glasses - one for two minutes and another for five minutes. Brewing her potion, she has to boil it for exactly eight minutes. Unfortunately, when the boiling started, she noticed that some part of the sand in the first (two-minute) sand glass is still in the top half. However, all the sand in the second (five-minute) sand glass is in the bottom half. How can she determine the moment to take the cauldron off the fire, measuring exactly eight minutes? Note: the sand falls with a constant speed, and you can neglect the time needed to reverse the sandglass.