Integrability of a class of N-dimensional Lotka-Volterra and Kolmogorov systems