N=\textbf{max}(A, B)\backslash M