#include #include using namespace std; using namespace atcoder; using ll = long long; using lb = long double; using ull = unsigned long long; using P = pair; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define rep2(i, n) for (int i = (n)-1; i >= 0; i--) #define repp(i, m, n) for (int i = m; i < n; i++) #define elif else if #define yes cout << "Yes" << endl; #define no cout << "No" << endl; #define fi first #define se second #define r0 return 0; #define Graph map> #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(),(a).rend() #define eb emplace_back #define pb pop_back #define int long long const int di[] = {-1,-1,-1,0,0,1,1,1}; const int dj[] = {-1,0,1,-1,1,-1,0,1}; const int dx[] = {1,0,-1,0}; const int dy[] = {0,1,0,-1}; template bool chmax(T1& a, T2 b) { if (a < b) { a = b; return true; } return false; } template bool chmin(T1& a, T2 b) { if (a > b) { a = b; return true; } return false; } const lb pi = 3.14159265358979; using mint = modint998244353; priority_queue, greater> pq; /*     ∧∧l||l   / ̄ ̄ ̄ ̄     /⌒ヽ)  < もうだめぽ…  ~(___)     \____   ''" ""''"" "''' */ signed main() { ios_base::sync_with_stdio(false); cin.tie(0); vector a(2, vector(2)), b(2, vector(2)); rep(i,2) rep(z,2) cin >> a[i][z]; b = a; rep(i,2) { a[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]; a[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]; a[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]; a[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]; } rep(i,2) rep(z,2) cout << a[i][z] << (z == 1 ? "\n":" "); }