Matrix Inverse

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

Given a square n×nn \times n matrix AA, the definition of its inverse B=A1B = A^{-1} is the matrix that fulfills the equality: AB=IAB = I

where BB and II are n×nn \times n matrices, and II is the identity matrix with ones along the diagonal, and zeros everywhere else: I=[100 010   001]I = \begin{bmatrix} 1 & 0 & \dots & 0 \\\ 0 & 1 & \dots & 0 \\\ \vdots & \vdots  & \ddots & \vdots \\\ 0 & 0 & \dots & 1 \end{bmatrix}

For this problem, you should implement a matrix inverse solver for 2×22 \times 2 matrices.

입력

Each test case is described by two lines of input. Each line has two 32-bit signed integers, and the integers given in order aa, bb, cc, dd represent the values of the matrix to invert: A=[ab cd]A = \begin{bmatrix} a & b \\\ c & d \end{bmatrix}

A blank line follows each test case.

출력

For each case, display the case number followed by two lines containing the inverse of the given matrix. Each test case is guaranteed to have an inverse (i.e. no matrix is singular), and that inverse is integervalued. Follow the format of the sample output.