#include typedef long long ll; using namespace std; #define rep(i,a,n) for (int i = a; i < (n); i++) template inline bool chmax(T & a, T b) { return ((a < b) ? (a = b, true) : (false)); } template inline bool chmin(T & a, T b) { return ((a > b) ? (a = b, true) : (false)); } int main() { int x[3], y[2]; cin >> x[0]; rep(i, 0, 2) cin >> y[i] >> x[i + 1]; if (y[0] == y[1]) cout << "Yes\n"; else cout << "No\n"; }