**Compilation/Execution Result:**

Now a days almost all scientific calculators have the property of solving a system of simultaneous equations. Code a program to do the same for the following and find the value of X,Y and Z.

** a1X + b1Y + c1Z = d1**

** a2X + b2Y + c2Z = d2**

** a3X + b3Y + c3Z = d3**

**Input:**

The first line of input takes the number of test cases T. Then T test cases follow.

Each test case has 3 input lines.

The 3 lines of each test case take 4 space separated integers denoting the values of a, b, c and d respectively.

Note: Your code should be able to handle double values.

**Output:**

Print 0 in case the system is inconsistent and 1 in case the system is consistent and has infinitely many solutions.

In case the system is consistent and has a unique solution, print 3 space separated integers denoting the floor values of X, Y and Z respectively.

**Constraints:**

1<=T<=100

-100<=a, b, c, d<=100

**Example:**

**Input:**

```
3
5 4 2 0
1 4 2 0
4 2 9 0
3.4 -8.9 10 12.3
4.5 3.2 -89.01 23.4
2.2 -2.1 1.1 12.3
-4.2 6 7 10
1 2 3 12
3 2 2 20
```

**Output:**

```
0 0 0
6 1 0
3 4 -1
```

Author: akundusaltlake

SANJAY5797 | 145 |

Himanshusinghchauhan | 120 |

iharshitmittal | 106 |

Lam Ngoc Pham | 105 |

rishusinha | 103 |

Shashank_Pathak | 652 |

dark_knights | 560 |

surbhi_7 | 556 |

SANJAY5797 | 453 |

Vasudha Gupta | 377 |

akhayrutdinov | 4161 |

sanjay05 | 3633 |

Quandray | 2833 |

Ibrahim Nash | 2524 |

Michael Riegger | 2308 |