The computational complexity of the gear placement problem