# The same outgoing and incoming degree in graph

I have an undirected graph with $$n$$ vertices and $$m$$ edges. How to determinate in $$poly (n, m)$$, is it possible (and how is it necessary) to orient all the edges so that each vertex has the same outgoing and incoming degree.