#include using namespace std; string x1, y11, x2, y2, x3; int main() { cin >> x1 >> y11 >> x2 >> y2 >> x3; cout << (y11 != y2 ? "No" : "Yes"); }