how to factor using the ac method