#include<iostream>
using namespace std;
int main()
{ int i,n,a[10];
int low=1,high=10,mid=0,flag=0;
for(i=1;i<=10;i++)
cin>>a[i];
cin>>n;
while(low<=high)
{ mid=(low+high)/2; //这个一定要放里面{一开始搞错了贼难受}
if(a[mid]==n)
{flag=1;break;}
else if(a[mid]<n)
low=mid+1;
else if(a[mid]>n)
high=mid-1;
}
if(flag) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;}
08-19
08-19
08-19