#include using namespace std; #define rep(i,a,b) for(int i=a;i> n; map _map; rep(i, 0, n) { string A; cin >> A; _map[A]++; } int _max = 0; for (auto &&p : _map) { _max = max(_max, p.second); } if ((n + 1) / 2 < _max) cout << "NO" << endl; else cout << "YES" << endl; }