Editorial
Need a hint? Checkout the editorial.
View Editorial
Editorial
Take point $P$ on segment $MN$ such that $BM=MP$. Since $MC+CN+MN=BC+CD$, then $MN=(BC-CM)+(CD-CN)=BM+DN$, hence $NP=DN$. Take point $E$ on the extension of $CB$ beyond $B$ such that $BE=DN$. So $AB=AD$, $\angle ABE=\angle ADN$ and $BE=DN$, which implies $\triangle ABE\cong\triangle ADN$. We also have $AE=AN$, $EM=EB+BM=DN+BM=MN$, $AM=AM$, so $\triangle AEM\cong\triangle ANM$, therefore $\angle NAM=\angle EAM=\angle EAB+\angle BAM=\angle DAN+\angle BAM=90^{\circ}-\angle NAM$
Now you've to do rest!