#include using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; bool ok = false; for (int dy = -3; dy <= 3; dy++) { for (int dx = -3; dx <= 3; dx++) { int nx = a + dx; int ny = b + dy; if (abs(a-nx) + abs(b-ny) <= 3) { if (nx == c && ny == d) { ok = true; } } } } if (a == c || b == d) { ok = true; } if (ok) { puts("1"); } else { puts("2"); } return 0; }