RD 400, love the old Yam air cooled 2 strokers had 3 x 400 dx's, 4 x 250's 2 x 200's and a pretty rear 200 torque induction model,,, mind you had a few seize up and melted a few pistons over the years,,,
Check you got the same plugs and gapped right in each cylinder, swap plugs over see if problem follows the plug, if your on points check them for gap, pitting,, along wires, earths, condensers, coils, leads. Then check the fuel side, carbs, balance pipe, air box cracked rubber inlets, reeds, any air leak will weaken the mix and cause over heating. Then the lube side of things for blockage and leaks,, to much or to little will cause her to over heat also, hope you get her sorted out,,, Hugh