An inlet pipe can (by itself) fill an empty tank in two hours and an outlet pipe (by itself) can drain the same tank when full in five hours. If the tank is half full when the valves for both pipes are opened, how long will it take to fill the tank?

is the answer 1 hour and 40 minutes? i did it in my head so if someone would correct me if it's wrong id appreciate it.