factorizar : nx-2ny-mx+2my