using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST{ static void Main(){ Sol mySol =new Sol(); mySol.Solve(); } } class Sol{ public void Solve(){ Array.Sort(D); if(CheckOne()){ Console.WriteLine(1); return; } if(CheckTwo()){ Console.WriteLine(2); return; } Console.WriteLine(-1); } bool CheckOne(){ for(int i=0;i= T){ if(D[l] - r0 <= T) return true; continue; } while(r - l > 1){ int c = (r + l) / 2; if(D[c] + r0 < T){ l = c; } else { r = c; } } if(r == N) continue; if(D[r] - r0 <= T) return true; } return false; } int N; long[] D; long X,Y; public Sol(){ N = ri(); D = rla(); var d = rla(); X = d[0]; Y = d[1]; if(X < 0) X *= -1; if(Y < 0) Y *= -1; } static String rs(){return Console.ReadLine();} static int ri(){return int.Parse(Console.ReadLine());} static long rl(){return long.Parse(Console.ReadLine());} static double rd(){return double.Parse(Console.ReadLine());} static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);} static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));} static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));} static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));} }