#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { int N; cin >> N; map m; for (int i = 0; i < N; ++i) { string a; cin >> a; m[a] += 1; } int l = 0; for (auto k:m) { l = max(l, k.second); } if ((l + 2 - 1) / 2 + 1 <= l) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }