We demonstrated the cancellation of the external magnetic field by the nuclear field at one edge of the nuclear polarization bistability in single InAlAs quantum dots. The cancellation for the electron Zeeman splitting gives the precise value of the hole g-factor. By combining with the exciton g-factor that is obtained from the Zeeman splitting for linearly polarized excitation, the magnitude and sign of the electron and hole g-factors in the growth direction are evaluated.