#include <bits/stdc++.h>   using namespace std;   int a[10][10], b[10][10];   struct per {     int x, y;   };   int k;   queue<per> q, q2;   void bf2() {     while (!q2.empty()) {       per aux;       aux = q2.front();       q2.pop();       int xx = aux.x - 1, yy = aux.y - 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x - 1, yy = aux.y;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x - 1, yy = aux.y + 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x, yy = aux.y - 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x, yy = aux.y + 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x + 1, yy = aux.y - 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x + 1, yy = aux.y + 1;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }       xx = aux.x + 1, yy = aux.y;       if (b[xx][yy] == 0) {         b[xx][yy] = b[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         q2.push(nou);       }     }   }   void bf1() {     while (!q.empty()) {       per aux;       aux = q.front();       q.pop();       int xx = aux.x - 1, yy = aux.y - 1;       while (a[xx][yy] == 0) {         a[xx][yy] = a[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         xx--;         yy--;         q.push(nou);       }       xx = aux.x - 1, yy = aux.y + 1;       while (a[xx][yy] == 0) {         a[xx][yy] = a[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         xx--;         yy++;         q.push(nou);       }       xx = aux.x + 1, yy = aux.y + 1;       while (a[xx][yy] == 0) {         a[xx][yy] = a[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         xx++;         yy++;         q.push(nou);       }       xx = aux.x + 1, yy = aux.y - 1;       while (a[xx][yy] == 0) {         a[xx][yy] = a[aux.x][aux.y] + 1;         per nou;         nou.x = xx;         nou.y = yy;         xx++;         yy--;         q.push(nou);       }     }   }   int main() {     int x1, x2, y1, y2;     cin >> x1 >> y1 >> x2 >> y2;     if (x1 == x2 || y1 == y2)       cout << 1 <<    ;     else       cout << 2 <<    ;     int i;     for (i = 0; i <= 9; i++) {       a[i][0] = -1;       a[i][9] = -1;       a[0][i] = -1;       a[9][i] = -1;       b[i][0] = -1;       b[i][9] = -1;       b[0][i] = -1;       b[9][i] = -1;     }     per st;     st.x = x1;     st.y = y1;     q.push(st);     a[x1][y1] = 1;     bf1();     if (a[x2][y2])       cout << a[x2][y2] - 1;     else       cout << 0;     cout <<    ;     int j;     b[x1][y1] = 1;     q2.push(st);     bf2();     if (b[x2][y2])       cout << b[x2][y2] - 1;     else       cout << 0;     return 0;   }