Sieve methods and class-number problems II