  There are many interesting dynamical systems in which degenerate invariant
tori appear. We give conditions under which these degenerate tori have stable
and unstable invariant manifolds, with stable and unstable directions having
arbitrary finite dimension. The setting in which the dimension is larger than
one was not previously considered and is technically more involved because in
such case the invariant manifolds do not have, in general, polynomial
approximations. As an example, we apply our theorem to prove that there are
motions in the $(n+2)$-body problem in which the distances among the first $n$
bodies remain bounded for all time, while the relative distances between the
first $n$-bodies and the last two and the distances between the last bodies
tend to infinity, when time goes to infinity. Moreover, we prove that the final
motion of the first $n$ bodies corresponds to a KAM torus of the $n$-body
problem.
