Chubby Yang is studying linear equations right now. He came up with a nice problem. In the problem you are given an *n* × *n* matrix *W*, consisting of integers, and you should find two *n* × *n* matrices *A* and *B*, all the following conditions must hold: 
 -  *A*<sub class="lower-index">*ij*</sub> = *A*<sub class="lower-index">*ji*</sub>, for all *i*, *j* (1 ≤ *i*, *j* ≤ *n*); -  *B*<sub class="lower-index">*ij*</sub> =  - *B*<sub class="lower-index">*ji*</sub>, for all *i*, *j* (1 ≤ *i*, *j* ≤ *n*); -  *W*<sub class="lower-index">*ij*</sub> = *A*<sub class="lower-index">*ij*</sub> + *B*<sub class="lower-index">*ij*</sub>, for all *i*, *j* (1 ≤ *i*, *j* ≤ *n*). 
Can you solve the problem?
The first line contains an integer *n* (1 ≤ *n* ≤ 170). Each of the following *n* lines contains *n* integers. The *j*-th integer in the *i*-th line is *W*<sub class="lower-index">*ij*</sub> (0 ≤ |*W*<sub class="lower-index">*ij*</sub>| &lt; 1717).
#include <bits/stdc++.h>
using namespace std;
                
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define REP(i, u, n) for (ll i = u; u<n ? i<n:i>n ; u<n ? i++:i--)
#define PI 3.1415926535897932384626
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define foitr(it, a) for(auto it : a)
#define inp(a) ll a; cin >> a;
#define inp2(x, y) ll x, y; cin >> x >> y;
#define inps(s) string s; cin >> s;
#define ainp(a, n) ll a[n]; REP(i, 0, n) cin>>a[i];
#define vinp(v, n) vector<float> v; REP(i, 0, n) {float k; cin >> k; v.pb(k);}
#define prints(n) cout<<(n)<<" ";
#define print(n) cout<<(n)<<"\n";
#define print2(a, b) cout << (a) << ' ' << (b) << '\n';
#define aout(a, n) REP(i, 0, n){cout<<a[i]<<" ";}; cout<<"\n";
#define vout(v) foitr(it, v){cout<<setprecision(8)<<it<<" ";}; cout<<"\n";
#define amax(arr, n) *max_element(arr, arr+n)
#define vmax(v) *max_element(all(v))
#define asum(arr, n) accumulate(arr, arr+n, 0LL)
#define vsum(v) accumulate(all(v), 0LL)
typedef unordered_map<ll, ll> umpll;
typedef unordered_map<char, ll> umpcl;
typedef map<ll, ll> mpll;
typedef map<char, ll> mpcl;
typedef pair<ll, ll> pll;
typedef vector<float> vl;
typedef vector<pll>	vpll;
typedef vector<vl> vvl;
typedef vector<string> vstr;
const ll mod1 = 1000000007;
const ll mod9 = 998244353;
  
ll powmod(ll a, ll b, ll mod = mod1){
    ll ans = 1;
    while(b--){ans = (ans*a)%mod;}
    return ans;
} 

ll gcd(ll a, ll b){
    ll tmp;
    while(b){
        tmp = a;
        a = b;
        b = tmp%b;
    }
    return a;
}

int main(){
    fast;
    ll t=1; 
    // cin >> t;
    while(t--){
        inp(n);
        // vinp(arr, n);
        vvl mat;
        REP(i, 0, n){vinp(tmp, n);mat.pb(tmp);}
        vl a(n);
        vvl mata(n, a);
        vvl matb(n, a);
        REP(i, 0, n)REP(j, 0, n){mata[i][j] = (mat[i][j]+mat[j][i])/2; matb[i][j] = (mat[i][j]-mat[j][i])/2;}
        cout << fixed;
        REP(i, 0, n){
            vout(mata[i]);
        }
        REP(i, 0, n) {vout(matb[i]);}
    }
    return 0;
} 
/*
//                  ."-,.__
//                  `.     `.  ,
//               .--'  .._,'"-' `.
//              .    .'         `'
//              `.   /          ,'
//                `  '--.   ,-"'
//                 `"`   |  \
//                    -. \, |
//                     `--Y.'      ___.
//                          \     L._, \
//                _.,        `.   <  <\                _
//              ,' '           `, `.   | \            ( `
//           ../, `.            `  |    .\`.           \ \_
//          ,' ,..  .           _.,'    ||\l            )  '".
//         , ,'   \           ,'.-.`-._,'  |           .  _._`.
//       ,' /      \ \        `' ' `--/   | \          / /   ..\
//     .'  /        \ .         |\__ - _ ,'` `        / /     `.`.
//     |  '          ..         `-...-"  |  `-'      / /        . `.
//     | /           |L__           |    |          / /          `. `.
//    , /            .   .          |    |         / /             ` `
//   / /          ,. ,`._ `-_       |    |  _   ,-' /               ` \
//  / .           \"`_/. `-_ \_,.  ,'    +-' `-'  _,        ..,-.    \`.
// .  '         .-f    ,'   `    '.       \__.---'     _   .'   '     \ \
// ' /          `.'    l     .' /          \..      ,_|/   `.  ,'`     L`
// |'      _.-""` `.    \ _,'  `            \ `.___`.'"`-.  , |   |    | \
// ||    ,'      `. `.   '       _,...._        `  |    `/ '  |   '     .|
// ||  ,'          `. ;.,.---' ,'       `.   `.. `-'  .-' /_ .'    ;_   ||
// || '              V      / /           `   | `   ,'   ,' '.    !  `. ||
// ||/            _,-------7 '              . |  `-'    l         /    `||
// . |          ,' .-   ,' ||               | .-.        `.      .'     ||
//  `'        ,'    `".'    |               |    `.        '. -.'       `'
//           /      ,'      |               |,'    \-.._,.'/'
//           .     /        .               .       \    .''
//         .`.    |         `.             /         :_,'.'
//           \ `...\   _     ,'-.        .'         /_.-'
//            `-.__ `,  `'   .  _.>----''.  _  __  /
//                 .'        /"'          |  "'   '_
//                /_|.-'\ ,".             '.'`__'-( \
//                  / ,"'"\,'               `/  `-.|" 
*/