Factorization of Expressions in the Form of ax+by and a�� b�� as a Product of Terms