# Need left large curly bracket that allows alignment in align environment

I know that \begin{cases}\end{cases} can give me large left bracket spanning multiple lines, but it does not work well when I want to align equations inside cases with that outside using &. For instance,

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
x&=1\\
y&=2\\
&\begin{cases}a&=3\\b&=4\end{cases}
\end{align}

\end{document}


The align environment treats cases as a whole object, but I want to align the equal signs both inside and outside of cases. Is there a way to do it?