Exact Bethe ansatz solution of O(2N) symmetric theories