  The analysis of stellar spectra depends upon the effective temperature (Teff)
and the surface gravity (log g). However, the estimation of log g with high
accuracy is challenging. A classical approach is to search for log g that
satisfies the ionization balance, i.e., the abundances from neutral and ionized
metallic lines being in agreement. We propose a method of using empirical
relations between Teff, log g and line-depth ratios, for which we meticulously
select pairs of FeI and FeII lines and pairs of CaI and CaII lines. Based on
YJ-band (0.97-1.32 micron) high-resolution spectra of 42 FGK stars (dwarfs to
supergiants), we selected five FeI-FeII and four CaI-CaII line pairs together
with 13 FeI-FeI pairs (for estimating Teff, and derived the empirical
relations. Using such relations does not require complex numerical models and
tools for estimating chemical abundances. The relations we present allows one
to derive Teff and log g with a precision of around 50 K and 0.2 dex,
respectively, but the achievable accuracy depends on the accuracy of the
calibrators' stellar parameters. It is essential to revise the calibration by
observing stars with accurate stellar parameters available, e.g., stars with
asteroseismic log g and stars analyzed with complete stellar models taking into
account the effects of non-local thermodynamic equilibrium and convection. In
addition, the calibrators we used have a limited metallicity range, [Fe/H]
between -0.2 and +0.2 dex, and our relations need to be tested and
re-calibrated based on a calibrating dataset for a wider range of metallicity.
