$999$ people, numbered $2$ to $1000$, are all on one side of a river and wish to reach the other side. There is a single boat with infinite capacity, but a group of people can only ride the boat together if every pair of people on the boat have numbers that are relatively prime. How many back-and-forth trips are needed to transport every person across the river?