Read fac N from stdin.