A water tank is two-fifth full. Pipe A can fill a tank on 10 minutes and pipe B can empty it in 6 minutes. If both the pipes are open, how long will it take to empty or fill the tank completely ?