Converting boolean function (dnf) to only 2-input NANDs
Don't worry much about three variable cases, you can always use two NANDs: 

https://www.quora.com/How-can-this-be-simplified-using-only-NAND-gate-A+B-C-D+E 

Writing it like this might help you: 

(¬B ∧ D) ∨ (A ∧ (¬B ∧ C)) ∨ (¬A ∧ (¬C ∧ ¬D)) ∨ (¬A ∧ (B ∧ ¬C))