#include using namespace std; int main(){ string a, p, q; cin >> a >> p >> q; if (p != q){ cout << "Yes" << endl; } else { cout << "No" << endl; } }