#include #include #include #include #include #include #include #include #include #include #define ll long long #define db double using namespace std; ll tt; struct mtx { ll len,a[10][10]; mtx operator * (const mtx &x) const { mtx res; res.len = len; for (ll i = 0;i < len;i++) { for (ll j = 0;j < len;j++) { ll y = 0; for (ll u = 0;u < len;u++) { y += (a[i][u] * x.a[u][j]); } res.a[i][j] = y; } } return res; } void prt() { for (ll i = 0;i < len;i++) { for (ll j = 0;j < len;j++) { printf("%lld ",a[i][j]); } printf("\n"); } } }; void solve() { mtx val,ans; val.len = ans.len = 2; for (ll i = 0;i < 2;i++) { for (ll j = 0;j < 2;j++) { scanf("%lld",&val.a[i][j]); } } ans = val * val * val; ans.prt(); } int main() { tt = 1; while(tt) { solve(); tt--; } return 0; }