# necessary and sufficient condition for the Poisson's equation to admit a solution$?$

$$−\Delta u = f \text{ in } \Omega$$ $$\frac{\partial u}{\partial n}= g \text{ on } \partial\Omega$$

where $\Omega\subset\mathbb R^n$ is a bounded domain with boundary $\partial\Omega$, $\Delta$ is the Laplace operator, $f$ and $g$ are given smooth functions and $\frac{\partial u}{\partial n}$ denotes the outer normal derivative of $u$. How to find out necessary and sufficient condition for the above problem to admit a solution?

My try:sorry,i don't know how to proceed.Thank you.

$$\int_\Omega \Delta u \, dx = \int_{\partial \Omega} \frac{\partial u}{\partial n} \, dS.$$