Use a generic rectangle and diamond to a factor trinomial