There are 12 pipes that are connected to a tank. Some of them are fill pipes and the others are drain pipes. Each of the fill pipes can fill the tank in 8 hours and each of the drain pipes can drain the tank completely in 6 hours. If all the fill pipes and drain pipes are kept open, an empty tank gets filled in 24 hours. How many of the 12 pipes are fill pipes?