  In this article, we first show that given a smooth function $ S $ either on
closed manifolds $ (M, g) $ or compact manifolds $ (\bar{M}, g) $ with
non-empty boundary, both for dimensions at least $ 3 $, the condition $ S
\equiv 0 $, or $ S $ changes sign and $ \int_{M} S \dvol < 0 $ (with zero mean
curvature if the boundary is not empty), is both the necessary and sufficient
condition for prescribing scalar curvature problems within conformal class $
[g] $, provided that the first eigenvalue of the conformal Laplacian is zero.
We then extend the same necessary and sufficient condition, in terms of
prescribing Gauss curvature function and zero geodesic curvature, to compact
Riemann surfaces with non-empty boundary, provided that the Euler
characteristic is zero. These results are the first full extensions since the
results of Kazdan and Warner \cite{KW2} on 2-dimensional torus, and of Escobar
and Schoen \cite{ESS} on closed manifolds for dimensions $ 3 $ and $ 4 $. We
then give results of prescribing nonzero scalar and mean curvature problems on
$ (\bar{M}, g) $, still with zero first eigenvalue and dimensions at least $ 3
$. Analogously, results of prescribing Gauss and geodesic curvature problems on
compact Riemann surfaces with boundary are given for zero Euler characteristic
case. Lastly, we show a generalization of the Han-Li conjecture. Technically
the key step for manifolds with dimensions at least $ 3 $ is to apply both the
local variational methods, local Yamabe-type equations and a new version of the
monotone iteration scheme. The key features include the smoothness of the upper
solution, the technical difference between constant and non-constant
prescribing scalar curvature functions, etc.
