Consider the following factoring problem:
Given an integer $r$ and another integer $N$ along with all of its $n$ number of prime factors and their corresponding multiplicities $\{p_i,e_i\}_{i=1}^n$, is there a partition of the prime factors and their multiplicities to $\{p_i,g_i\}_{i=1}^n$ and $\{p_i,h_i\}_{i=1}^n$ where at every $i$ we have $e_i=g_i+h_i$ and $g_i,h_i\geq0$ holds such that $$\Bigg|\prod_{i=1}^np_i^{g_i}-\prod_{i=1}^np_i^{h_i}\Bigg|<r?$$
The problem is clearly in $NP$ and might be in $PromiseUP$ for small enough $r$ depending on $N$ (if there exist a $PTIME$ computable $r_{min}$ depending on $N$ then the problem is in $P$). Is it $NP$-hard or is it in $coNP$ or is it in $P$?
Update It appears from comments that I am looking for the factor closest to $\sqrt{N}$ when the list of prime factors dividing $N$ is given. Is this problem $NP$-hard?
Seems similar to finding a split a given multiset of integers to two complementary submultisets (intersection is empty while union is whole) whose respective sums are close to each other. This subset sum problem might be $NP$-complete as it is similar to https://en.wikipedia.org/wiki/Partition_problem.