Given as input:

- an ordered list of distinct prime numbers $A = ( p_1,p_2,...,p_n )$,
a set of triples $B = \{ (a_1, b_1, c_1 ), (a_1, b_1, c_1 ), ...., (a_m, b_m, c_m ) \}$, where $a_i, b_i, c_i \in A$ represent the factorization of the number: $$x = a_1^{b_1 c_1} \cdot a_2^{b_2 c_2} \cdot ... \cdot a_m^{b_m c_m}$$

and an integer $K$

Can we calculate in polynomial time if there exists a permutation $\pi$ of $[1..n]$ such that

$$\bar x = \bar a_1^{\bar b_1 \bar c_1} \cdot \bar a_2^{\bar b_2 \bar c_2} \cdot ... \cdot \bar a_m^{\bar b_m \bar c_m}$$

is less than $K$ ?

(where $\bar a_{i}, \bar b_{i}, \bar c_{i}$ are simply the permutation of the corresponding prime,

for example if $a_i = p_j$ then $\bar {a_i} = p_{\pi(j)}$)

Very informally:

Can we shuffle the primes of $x$ and make it less than $K$ ?

Does the problem become easier if $B$ is a set of pairs $\{a_i,b_i\}$ that represents the number: $$x' = a_1^{b_1} \cdot ... \cdot a_m^{b_m}$$