Let $x_1, x_2, \dots, x_n$ be a sequence of integers such that $-1 \leq x_i \leq 2$ for $i = 1, 2, \dots, n$. It is given that:
\[ x_1 + x_2 + \dots + x_n = 7 \]
and
\[ x_1^8 + x_2^8 + \dots + x_n^8 = 2009. \]
Let $m$ and $M$ be the minimal and maximal possible values of $x_1^9 + x_2^9 + \dots + x_n^9$, respectively. Find $\frac{M}{m}$. Round your answer to the nearest integer, if necessary.

Let's think step by step and output the final answer within \boxed{}.
user