A little-known fact about Richard Stallman is that he loves to share not only his source code, but also his recipes. Because of this, he often needs to scale a recipe up to feed a few extra programmers: he multiplies the amount of every ingredient by some constant factor. Doing this by hand has grown tedious, and the fractions involved lead to mistakes. Hungry programmers get grumpy when the food turns out badly, and they start losing focus and breaking the build. Your task is to prevent all of that by writing a program that converts recipes automatically.
The first line contains the number $K$ of data sets. The $K$ data sets follow, each describing one recipe in the format below.
The first line of a recipe contains two integers $I$ and $C$: the number of ingredients and the constant factor to multiply by. The next $I$ lines each describe one ingredient with three integers $w$, $n$, and $d$, giving the amount used in the original recipe.
On each ingredient line, $w$ and $n$ are separated by whitespace, while $n$ and $d$ are separated by a single slash (written as n/d). The denominator $d$ is always one of $1$, $2$, $3$, $4$, or $8$.
For each data set, print a line Data Set x: on its own, where $x$ is the data set number, starting from $1$. On the following $I$ lines, print the scaled amount of each ingredient.
whole n/d, with the whole part separated from the fraction by a single space (the whole part may be $0$).Separate consecutive data sets with a blank line.