How can I solve this proof? (Prime factorization) Let $p_1, p_2, ... , p_n$ be $n$ distinct primes. Prove that for all $x ∈ \Bbb{Z}$ we have $ p_i | x $ for all $i ∈ \{1,2, ... , n\}$ if and only if $(p_1*p_2* ...*p_n)|x$.
Hello. I'm very lost in this proof. I know there must be some element of prime factorization, and I know you must go in both directions. All answers are appreciated on how to solve this proof.
 A: First suppose that $p_1 \times ... \times p_n$ divides $x$. Then by definition, there exists $q$ such that $x = p_1 \times ... \times p_n \times q$. For all $i \in \lbrace 1, ..., n \rbrace$, you see that there exists $q_i$ such that $x = p_i q_i$, so by definition, $p_i$ divides $x$.
Now, let's suppose that for each $i$, your prime number $p_i$ divides $x$. Then, all the $p_i$ appear in the unique prime factorization of $x$. Because they are all distinct, the product $p_1 \times ... \times p_n$ appears in this factorization. That means that $p_1 \times ... \times p_n$ divides $x$. 
A: To show the non-trivial direction by induction, suppose $p_i\mid x$ for $1\le i\le n$. In particular, $x=p_ny$ for some integer $y$. Then for $1\le i\le n-1$, we have $p_i\mid p_ny$. As $p_i$ is prime, this implies $p_i\mid p_n$ or $p_i\mid y$. As $p_i$ and $p_n$ are distinct primes, the first possibility is ruled out. Hence $p_i\mid y$ for $1\le i\le n-1$. By induction hypothesis, we can conclude $p_1p_2\cdots p_{n-1}\mid y$ and hence $p_1p_2\cdots p_{n-1}p_n\mid p_ny=x$.
