#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vl; typedef complex P; typedef pair pii; #define REP(i,n) for(ll i=0;i>n; map mp; REP(i,n){ string s; cin>>s; mp[s]++; } map::iterator iter = mp.begin(); while(iter!=mp.end()){ int val = iter->second; if(val > (n+1)/2){ cout<<"NO"<