#include <bits/stdc++.h>   using namespace std;   vector<string> a, b;   int n, m, k;   string s;   int main() {     cin >> n >> m;     for (int i = 0; i < n; ++i) {       cin >> s;       a.push_back(s);     }     for (int i = 0; i < m; ++i) {       cin >> s;       b.push_back(s);     }     for (int i = 0; i < n; ++i) {       for (int j = 0; j < m; ++j) {         if (a[i] == b[j]) ++k;       }     }     if (k % 2 == 0) {       if (n > m)         cout <<  YES ;       else         cout <<  NO ;     } else {       if (n >= m)         cout <<  YES ;       else         cout <<  NO ;     }   }   