  We address the problem of the existence of a Lagrangian for a given system of
linear PDEs with constant coefficients. As a subtask, this involves bringing
the system into a pre-Lagrangian form, wherein the number of equations matches
the number of unknowns. We introduce a class of overdetermined systems, called
co-flat, and show that they always admit a pre-Lagrangian form, which can be
explicitly constructed using auxiliary variables. Moreover, we argue that such
systems enjoy pre-Lagrangian formulations without auxiliary variables at all.
As an application of our method, we construct new pre-Lagrangian and Lagrangian
formulations for free massive fields of arbitrary integer spin. In contrast to
the well-known models of Singh and Hagen, our Lagrangians involve much fewer
auxiliary fields.
