#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<> typedef long long ll; using namespace std; const ll inf=1e18+7; int N; int d[16]; int x,y; int ans; int main() { cin>>N; REP(i,0,N) { cin>>d[i]; } cin>>x>>y; x=abs(x); y=abs(y); if(x==0&&y==0){ ans=0; p(ans); return 0; } sort(d,d+N); bool ok=false; REP(i,0,N){ if(max(x,y)==d[i]){ ok=true; } } if(ok) ans=1; else if(max(x,y)