Both are equally important. Depending on your goals and current fitness level you need to incorporate a well balanced plan which combines a diet that is customized to your needs and a fitness plan that will help you get to your goals faster and more efficiently. Talking to a dietitian will save you a lot of bad choices and time because she/he will guide you to make the right choices. The same goes for hiring a trainer. The trainer will help you reach those goals faster and safer. Also, if you have any type of medical condition or injury it would be wiser for you to spent some money and work with a dietitian and a trainer, so you can avoid some mistakes and choices that would make it more difficult for you to lose weight and improve your physical condition.