#include using namespace std; #define rep(i,a,b) for(int i=a;i> N; map A; rep(i, 0, N) { string a; cin >> a; A[a]++; } for (pair p : A) { if (N - p.second <= p.second) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }