Hard
Product of All the Others
Read integers and print, for each position, the product of all the other numbers, without using division. Build a list of products from the left and another from the right.
Input
Integers separated by spaces (at least 2).
Output
One line.
Sample 1
Input
1 2 3 4
Output
24 12 8 6
Sample 2
Input
5 0
Output
0 5
Output appears here