What is the remainder of $16!$ is divided by 19?

If you've seen Wilson's theorem then you know the remainder when $18!$ is divided by $19$. To get $16!$ mod $19$, then, you can multiply by the multiplicative inverses of $17$ and $18$ mod $19$. Do you know how to find these? (Edit: Referring to both inverses might be a bit misleading, because you really only need to invert their product. See also Bill Dubuque's answer.)


Hint $ $ By Wilson's theorem $\bmod 19\!:\ \overbrace{{-}1}^{\large \color{#0a0}{18}} \equiv 18! \equiv\!\! \overbrace{18\cdot17}^{\large \color{#c00}{(-1)(-2)}}\!\!\cdot 16!\,$ $\Rightarrow\,16!\equiv \dfrac{\color{#0a0}{18}}{\color{#c00}2}\equiv 9$

Generally (Wilson reflection formula) $\rm\displaystyle\ (p\!-\!1\!-\!k)!\equiv\frac{(-1)^{k+1}}{k!}\!\!\!\pmod{\!p},\,$ $\rm\:p\:$ prime