Yes. It's true that neither has been a good neighbour, but change must start with someone. The best thing would be to build as many economic ties as possible with both countries so that there is increasing disincentive for either to be so disruptive.
It will be fooloish if we expect that china & Pakistan will mend their way howsoever hard we try. They are hostile to India & will remain so. Only strong india politically & militarily can thwart their ill designs. China will not settle to anything short of their claim on Indian land & Pakistan can come to terms to the existence of Hindu India.India face threwat at border & from within the latter is being ignored by Congress as it affects their muslim vote bank.
We must understand that our great scholar Hardyal M.A. had told us that to rule over any other country "Divide&Rule" works well. If we are to grow better than any one else we have to follow the rule of mutual adjustment while taking lead as a champion by gaining strength from outside world. We have to play smart and I am convinced that India is playing smart these days. Keeping good relations with your neighbours is good for us.
We must keep army as a standby for any eventualities but use its services for civilian policing and medication actvities as well as in administration as an independent body to root out corruption.
There should not be absolute all or none rule while formulating foreign policy toward the two neighbours. We shall have to be extremely cautious while dealing with China. We have already made a great mistake while recognising their absolute authority over Tibet. Let us, in the meantime make our strategic relation with South East Asian countries, Japan and South Korea stronger.