How to convert a binary tree into binary search tree keeping the structure of tree intact?

For example

Input : Binary Tree

A / \ B E / \ \ C D B / \ C D

Output : Yes