format the problem output correctly