A three way switch is the easiest way to do what you describe. The only drawback is that the switch may be ON in the up position one day and in the down position the next day.
It can also be wired with a low voltage relay controlled by rocker switches in each bathroom. This method costs more, requires greater knowledge to install, and parts are harder to find. With this arrangement pressing the top of the swittch is always ON and the bottom is always OFF.
There is at least one other method involving a solid state controller but the cost of an additional fan is a less expensive way to go.
Someone else out there may have further suggestions.
Regards