Factor by Grouping am-bm+an-bn