#include #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)<>n; int d[16]; int idou=0; REP(i,0,n) { cin>>d[i]; idou=max(idou,d[i]); } cin>>x>>y; int ans=-1; int goal=max(abs(x),abs(y)); if(goal==0) ans=0; if(ans<0) REP(i,0,n) if(goal == d[i]) ans=1; if(ans<0)for(ans=2;goal>idou*ans;ans++) ; p(ans); return 0; }