Canonical form of Euler-Lagrange equations and gauge symmetries