CS170 problem about the number of modular domains with a total of 2 multiplicative inverses