How hard is finding values such that We can work with powers of some naturals $(x_k)^{m_k}$.  Here we have $n$ naturals, and $m_k$ is an integer in the range $-r$ to $r$.  My question is, how small can $p$ be so that
$$\prod_{k=1}^n{(x_k)^{m_k}}$$
is unique for any collection of $m_k$'s?  In other words, for any set of $k$ integers of one's choosing, how small can we make $p$ so that the product above is always unique?  The answer doesn't have to be perfect.  Even a general idea would be good.
AN EXAMPLE
Let $n=2$.
Then we can pick $x_1=2$ and $x_2=3$, and find that $p=31$ works.  We could choose any $x$'s we like, in order to get a smaller $p$.
and here's a table of powers:
\begin{array}{c|c|c|c|c|c|}
\times & 2^{-2} & 2^{-1} & 2^0 & 2^1 & 2^2 \\
\hline
3^{-2} & 25 &  19 &  7 & 14 & 28 \\
\hline
3^{-1} & 13 & 26 & 21 & 11 & 22\\
\hline
3^0 & 8 & 16 & 1 & 2 & 4\\
\hline
3^1 & 24 & 17 & 3 & 6 & 12 \\
\hline
3^2 & 10 & 20 & 9 & 18 & 5 \\
\hline
\end{array}
So by picking the $x$'s carefully, we have made sure that all powers from $-2$ to $2$ for both numbers is unique.  And this then works for $p=31$, as shown.
THE QUESTION, AGAIN
We're given $n$ and $r$, and wish to solve for $p$.
So if we have $n$ values of $x$ (of our choosing - they're not given - they can help make the problem easier), and we are interested in all powers between $-r$ and $r$, how small can $p$ be?
ANOTHER TIDBIT
I'm wondering if this would be considered research-level mathematics.  Perhaps someone can answer this?

Here' sort of a baseline answer.  It doesn't provide a very good bounds, but we can prove it works.  Please pardon my description, as I know it could be a lot better.  Any suggestions that will improve this are welcome.
So we start with $n$ values, and we want to ensure they're unique when we use the given function in the question.
We also start knowing the powers range from $-r$ to $r$.  This means that we'll be using $2r + 1$ powers of each number.
So, we can start by choosing the $x$ values to be the $n$ smallest primes.  Then we know that we'll have each $x$ value range from $x^{-r}$ to $x^r$, inclusive.  We temporarily change this range of powers to be from $x^0$ to $x^{2r}$, inclusive, which will give us $2r + 1$ powers.
Then if we pick a prime that is greater than 
$$\prod_{k=1}^n{(x_k)^{2r}} = (x_1)^{2r} \cdot (x_2)^{2r} \cdot (x_3)^{2r}\dots (x_n)^{2r} \tag{1}$$
...all of these new powers are guaranteed to be unique.  That is because the factorization of each number in this form is unique from any other number of this form, since we are using primes.  In other words, we have created a unique factorization by using this form.
Now, since we are working modulo a prime, and hence also working with a finite field, we know that we can multiply by $(x_k)^{-r}$ for any $x^k$ and the values in the above function will still be unique.
Thus we can now multiply all of the values in the above function by:
$$\prod_{k=1}^n{(x_k)^{-r}} = (x_1)^{-r} \cdot (x_2)^{-r} \cdot (x_3)^{-r}\dots (x_n)^{-r} \tag{2}$$
And this will give us the function for our original range.  Thus we have proved that we can get the unique values that we are after by picking ANY $p$ such that $p$ is prime and greater than Equation (1).
