#include using namespace std; int main(){ int H, W; cin >> H >> W; int ni, nj; cin >> ni >> nj; int zi, zj; cin >> zi >> zj; int dx[4] = {0, -1, 0, 1}, dy[4] = {1, 0, -1, 0}; for(int i = 0; i < 4; i++){ int nx = ni + dx[i], ny = nj + dy[i]; if(nx == zi && ny == zj){ cout << "Yes" << endl; return 0; } else if(abs(nx - zi) == 1 && abs(ny - zj) == 1){ cout << "Yes" << endl; return 0; } } if(H == 2){ if(zi != ni && zj % 2 == nj % 2) cout << "Yes" << endl; else if(zi == ni && zj % 2 != nj % 2) cout << "Yes" << endl; } else if(W == 2){ if(zj != nj && zi % 2 == ni % 2) cout << "Yes" << endl; else if(zj == nj && zi % 2 != nj % 2) cout << "Yes" << endl; } cout << "No" << endl; }