I want to make a header using \usepackage{fancyhdr} and \pagestyle{fancy}. But when chapter and section names are long they overlap. Is there an option to force line breaks in the header so that they do not overlap?
Here a minimal example:
\documentclass{report}
% specifying header
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\chapter{A very long chapter title that should be on the top right}
\section{A very long section title that should be on the top left}
\newpage
Here, the header looks messy.
\end{document}
I saw that this question was discussed here but I hope that this did not really help me.

