Consider a point particle in $n$ dimensions.
For a Lagrangian $\mathcal L(\mathbf{q, \dot q}, t)$, we have that $\mathbf q(t)$ is a feasible trajectory for times $t_0<t<t_f$ iff it extremizes the integral $$ \int_{t_0}^{t_f}\mathcal L(\mathbf q(t), \mathbf{\dot q}(t), t)\;dt. $$ This is equivalent to saying that E-L equation $$ \frac{\partial\mathcal L}{\partial\mathbf q} (\mathbf q(t), \mathbf{\dot q}(t), t) = \left[ \frac{d}{dt'} \frac{\partial\mathcal L}{\partial\mathbf{\dot q}} (\mathbf q(t'), \mathbf{\dot q}(t'), t') \right]_{t'=t} $$ is satisfied.
Now, suppose that I give a Hamiltonian $H(\mathbf{q, p}, t)$ for the particle. Then, for a feasible phase space path $(\mathbf q(t), \mathbf p(t))$, there are Hamilton's equations \begin{align*} \frac{\partial H}{\partial\mathbf q}(\mathbf q(t), \mathbf p(t), t) &= -\mathbf{\dot p}(t)\\ \frac{\partial H}{\partial\mathbf p}(\mathbf q(t), \mathbf p(t), t) &= \mathbf{\dot q}(t) \end{align*} which are satisfied. Now, I am aware that I can construct a Lagrangian (supplying$\frac{\partial H}{\partial\mathbf p}(\mathbf{q, p}, t)$ in Lagrangian's $\mathbf{\dot q}$) and this will give me a corresponding action integral, which will be extremized iff the the above Hamilton's equations are satisfied.
Question: Is there something that can be extremized in Hamiltonian formalism that is equivalent to Hamilton's equations, which does not rely on defining Lagrangians?