Hint: Noether's theorem yields that $$\begin{align} L\text{ has no explicit }&x\text{-dependence} \cr \quad& \Downarrow&\quad\cr \text{momentum } &p_x \text{ conserved} \end{align} $$$$\begin{align} L\text{ has no }&x\text{-dependence} \cr \quad& \Downarrow&\quad\cr \text{momentum } &p_x \text{ is conserved}, \end{align} $$ and $$\begin{align} L\text{ has no explicit }&t\text{-dependence} \cr \quad& \Downarrow&\quad\cr \text{energy } p_x\dot{x}+p_y\dot{y}&-L\text{ conserved}. \end{align} $$$$\begin{align} L\text{ has no explicit }&t\text{-dependence} \cr \quad& \Downarrow&\quad\cr \text{energy } p_x\dot{x}+p_y\dot{y}&-L\text{ is conserved}. \end{align} $$