#include <bits/stdc++.h>
using namespace std;
int n,a[2222];
stack <int> s;
int main(){
while(cin>>n){
while(!s.empty())s.pop();
for(int i=1;i<=n;i++){
cin>>a[i];
}
s.push(a[1]);
for(int i=2;i<=n;i++){
if(a[i]<s.top()){
s.pop();
s.push(a[i]);
}else if(a[i]>s.top()){
s.push(a[i]);
}
}
if(s.size()>=n/2){
cout<<"Yes!\n";
}else{
cout<<"No!\n";
}
}
return 0;
}