#include using namespace std; struct M { int64_t A, B, C, D; }; M operator*(const M &a, const M &b) { return M{a.A * b.A + a.B * b.C, a.A * b.B + a.B * b.D, a.C * b.A + a.D * b.C, a.C * b.B + a.D * b.D}; } int main() { ios::sync_with_stdio(false); cin.tie(0); M a, b; cin >> a.A >> a.B >> a.C >> a.D; cin >> b.A >> b.B >> b.C >> b.D; M c = a * b * a * b; cout << c.A << ' ' << c.B << endl; cout << c.C << ' ' << c.D << endl; }