#include using namespace std ; int main() { int x, y, a, b ; cin >> x >> y >> a >> b ; cout << ((x >= a + 2 && y >= b + 2) ? 1 : 0) << endl ; }