/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int n,m;
Scanner in
= new Scanner
(System.
in); n=in.nextInt();
m=in.nextInt();
double [][] A = new double [n][m];
for (int i=0; i<n; i++){
for (int j=0; j<m; j++){
A[i][j]=in.nextDouble();
}
}
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++){
if (A[i][j]!=0){
A[i][j]=-(1/A[i][j]);
}
}
}
for (int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
System.
out.
printf("%.6f ",A
[i
][j
]); }
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWludCBuLG07IAoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCW49aW4ubmV4dEludCgpOwoJCW09aW4ubmV4dEludCgpOwoJCWRvdWJsZSBbXVtdIEEgPSBuZXcgZG91YmxlIFtuXVttXTsKCQlmb3IgKGludCBpPTA7IGk8bjsgaSsrKXsKCSAgIAkJZm9yIChpbnQgaj0wOyBqPG07IGorKyl7CgkJCQlBW2ldW2pdPWluLm5leHREb3VibGUoKTsKCQkJfQoJCSB9CgkJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspewoJCQlmb3IgKGludCBqID0gMDsgaiA8IG07IGorKyl7CgkJCQlpZiAo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