# No vertical spacing between Theorems in Beamer

How to set no vertical spacing between Theorems in Beamer? Since the following code produce some vertical spacing above and below each theorem.

\documentclass{beamer}
\usetheme{Berlin}
\begin{document}
\begin{frame}
\begin{theorem}
A
\end{theorem}
\begin{theorem}
B
\end{theorem}
\end{frame}
\end{document}