#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(4), b(4); rep(i,4) cin >> a[i]; b = a; rep(i,2) { a[0] = a[0]*b[0]+a[1]*b[2]; a[1] = a[0]*b[1]+a[1]*b[3]; a[2] = a[2]*b[0]+a[3]*b[2]; a[3] = a[2]*b[1]+a[3]*b[3]; } cout << a[0] << " " << a[1] << endl; cout << a[2] << " " << a[3] << endl; }