PUMaC 2009 Algebra A Problem 7

Let x_{1}, x_{2}, \ldots, x_{n} be a sequence of integers, such that -1 \leq x_{i} \leq 2, for i=1,2, \ldots, n, x_{1}+x_{2}+\cdots+x_{n}=7 and x_{1}^{8}+x_{2}^{8}+\ldots x_{n}^{8}=2009. Let m and M be the minimal and maximal possible value of x_{1}^{9}+x_{2}^{9}+\ldots x_{n}^{9}, respectively. Find \frac{M}{m}.