#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#define sqr(x) ((x)*(x))
const double pi=acos(-1),eps=1e-8;
const int oo=1073741819;
using namespace std;
struct point{
    double x,y;
}a[200],b[200];
double l[200],r[200],A,B,C;
int n;
bool f[35][35][35][35];
double dist(point a,point b)
{
    return sqrt(sqr(a.x-b.x)+sqr(a.y-b.y));
}
int CircleCrossCircle(point p1,double r1,point p2,double r2,point &cp1,point &cp2)
{
    double tmp=dist(p1,p2);
    if (!((tmp>fabs(r1-r2)-eps) && (tmp<r1+r2+eps))) return 0;
    if (fabs(p1.x-p2.x)<eps && fabs(p1.y-p2.y)<eps) return 0;
    double mx=p2.x-p1.x,sx=p2.x+p1.x,mx2=mx*mx;
    double my=p2.y-p1.y,sy=p2.y+p1.y,my2=my*my;
    double sq=mx2+my2,d=-(sq-sqr(r1-r2))*(sq-sqr(r1+r2));
    if (d+eps<0) return 0;if (d<eps) d=0;else d=sqrt(d);
    double x=mx*((r1+r2)*(r1-r2)+mx*sx)+sx*my2;
    double y=my*((r1+r2)*(r1-r2)+my*sy)+sy*mx2;
    double dx=mx*d,dy=my*d;sq*=2;
    cp1.x=(x-dy)/sq;cp1.y=(y+dx)/sq;
    cp2.x=(x+dy)/sq;cp2.y=(y-dx)/sq;
    if (d>eps) return 2;else return 1;
}
int check(point c,int i,int j,int k,int p)
{
 //   cout<<oo<<endl;
    if (dist(c,a[i])-B>eps) return 0;
    if (dist(c,a[j])-B>eps) return 0;
 //   cout<<dist(c,a[j])<<' '<<c.x<<' '<<c.y<<' '<<a[j].x<<' '<<a[j].y<<' '<<j<<endl;
    if (dist(c,a[k])-C>eps) return 0;
    if (dist(c,a[p])-C>eps) return 0;
    return 1;
}
int doit1(int i,int j,int k,int p)
{
    if (check(a[i],i,j,k,p)) return 1;
    if (check(a[j],i,j,k,p)) return 1;
    if (check(a[k],i,j,k,p)) return 1;
    if (check(a[p],i,j,k,p)) return 1;
//    cout<<oo<<endl;
    point c1,c2;
    b[1]=a[i],b[2]=a[j],b[3]=a[k],b[4]=a[p];
    for (int u1=1;u1<=2;u1++)
        for (int u2=3;u2<=4;u2++)
            if (CircleCrossCircle(b[u1],B,b[u2],C,c1,c2)) {
                if (check(c1,i,j,k,p)) return 1;
                if (check(c2,i,j,k,p)) return 1;
            }
    if (CircleCrossCircle(a[i],B,a[j],B,c1,c2)) {
        if (check(c1,i,j,k,p)) return 1;
        if (check(c2,i,j,k,p)) return 1;
    }
    if (CircleCrossCircle(a[k],C,a[p],C,c1,c2)) {
        if (check(c1,i,j,k,p)) return 1;
        if (check(c2,i,j,k,p)) return 1;
    }
    return 0;
}
double angle(point o,point c)
{
    return atan2(c.y-o.y,c.x-o.x);
}
int interval(double tmp,int i)
{
    if (tmp-l[i]<-eps) tmp+=2*pi;
    return (tmp-l[i]>-eps) && (tmp-r[i]<eps);
}
void doit2(int i,int j,point c1,point c2)
{
    double e,tmp;
    l[i]=angle(a[i],c1);
    r[i]=angle(a[i],c2);
    if (l[i]-r[i]>eps) e=l[i],l[i]=r[i],r[i]=e;
    tmp=angle(a[i],a[j]);
    if (!interval(tmp,i)) {l[i]+=2*pi;e=l[i],l[i]=r[i],r[i]=e;}
    l[j]=angle(a[j],c1);
    r[j]=angle(a[j],c2);
    if (l[j]-r[j]>eps) e=l[j],l[j]=r[j],r[j]=e;
    tmp=angle(a[j],a[i]);
    if (!interval(tmp,j)) {l[j]+=2*pi;e=l[j],l[j]=r[j],r[j]=e;}
}
double doit3(int i,int j)
{
    double tmp=angle(a[i],a[j]),t2=angle(a[j],a[i]);
//    cout<<tmp<<' '<<t2<<endl;
//    cout<<l[i]<<' '<<r[i]<<' '<<l[j]<<' '<<r[j]<<endl;
    if (!interval(tmp,i)||!interval(t2,j)||(dist(a[i],a[j])<B+C-eps))return oo; //不能直接判&#26497;角区&#38388;，因&#20026;它可能先&#36807;&#22278;心，再穿&#36807;梭形区域
    return dist(a[i],a[j]);
}
double doit4(point p,int i,int P)
{
    double tmp=angle(a[i],p);
    if (!interval(tmp,i) || (dist(a[i],p)<P-eps))return oo;
    return dist(a[i],p);
}

struct data{
    int x,y,u,v;
}DL[1000005],pre[32][32][32][32];
int D[32][32][32][32];
int h=1,t=0;
inline void Add(data &x,int d1,data &y){
    if(f[x.x][x.y][x.u][x.v]&&D[x.x][x.y][x.u][x.v]==-1){
        t++;
        DL[t]=x;
        D[x.x][x.y][x.u][x.v]=d1;
        pre[x.x][x.y][x.u][x.v]=y;
    }
}
int main()
{
//    freopen("f.out","w",stdout);
    scanf("%d",&n);
    scanf("%lf%lf%lf",&A,&B,&C);
    for (int i=1;i<=n;i++) {
        scanf("%lf%lf",&a[i].x,&a[i].y);
/*        int j;
        for(j=1;j<i;j++)
            if(fabs(a[i].x-a[j].x)<eps&&fabs(a[i].y-a[j].y)<eps)break;
        if(j<i){
            i--;
            n--;
        }*/
    }
//    cout<<a[21].x<<' '<<a[21].y<<endl;
    for (int i=1;i<=n;i++)
        for (int j=1;j<=n;j++)
            if (i!=j) 
                for (int k=1;k<=n;k++)
                    if (i!=k && j!=k)
                        for (int p=1;p<=n;p++)
                            if (i!=p && j!=p && k!=p) {
                                if (doit1(i,j,k,p)) {
                                    f[i][j][k][p]=1;
//                                    cout<<i<<' '<<j<<' '<<k<<' '<<p<<endl;
                                    continue;
                                }
//                                cout<<i<<' '<<j<<' '<<k<<' '<<p<<endl;
                                point c1,c2,c3,c4;
                                if (!CircleCrossCircle(a[i],B,a[j],B,c1,c2)) continue;
                                if (!CircleCrossCircle(a[k],C,a[p],C,c3,c4)) continue;
//                                cout<<i<<' '<<j<<' '<<k<<' '<<p<<endl;
                                doit2(i,j,c1,c2);
                                doit2(k,p,c3,c4);
                                double ans=oo;
                                ans=min(ans,dist(c1,c3));
                                ans=min(ans,dist(c1,c4));
                                ans=min(ans,dist(c2,c3));
                                ans=min(ans,dist(c2,c4));
                                ans=min(ans,doit4(c1,k,C)-C);
                                ans=min(ans,doit4(c1,p,C)-C);
                                ans=min(ans,doit4(c2,k,C)-C);
                                ans=min(ans,doit4(c2,p,C)-C);
                                ans=min(ans,doit4(c3,i,B)-B);
                                ans=min(ans,doit4(c3,j,B)-B);
                                ans=min(ans,doit4(c4,i,B)-B);
                                ans=min(ans,doit4(c4,j,B)-B);
                                double tmp=0;
                                ans=min(ans,tmp=doit3(i,k)-B-C);
//                                cout<<tmp<<endl;
                                ans=min(ans,tmp=doit3(i,p)-B-C);
//                                cout<<tmp<<endl;                                
                                ans=min(ans,tmp=doit3(j,k)-B-C);
//                                cout<<tmp<<endl;                                
                                ans=min(ans,tmp=doit3(j,p)-B-C);
//                                cout<<tmp<<endl;                                
//                                cout<<i<<' '<<j<<' '<<k<<' '<<p<<' '<<ans<<' '<<A<<' '<<ans-A<<endl;
                                if (ans-A<eps) f[i][j][k][p]=1;
                            }
    memset(D,0xff,sizeof(D));
    D[1][2][3][4]=0;
    data tt,t1;
    tt.x=1;
    tt.y=2;
    tt.u=3;
    tt.v=4;
    DL[1]=tt;
    h=0;t=1;
    pre[1][2][3][4].x=-1;
    do{
        h++;
        int d1;
        /* move hand x*/
        tt=DL[h];
        d1=D[tt.x][tt.y][tt.u][tt.v];
//        cout<<tt.x<<' '<<tt.y<<' '<<tt.u<<' '<<tt.v<<' '<<d1<<endl;
        t1=tt;
        for(int i=1;i<=n;i++){
            tt=t1;
            tt.x=i;
            if(tt.x>tt.y)swap(tt.x,tt.y);
            Add(tt,d1+1,t1);
            /*if(f[tt.x][tt.y][tt.u][tt.v]&&D[tt.x][tt.y][tt.u][tt.v]==-1){
                D[tt.x][tt.y][tt.u][tt.v]=D[t1.x][t1.y][t1.u][t1.v]+1;
                DL[++t]=tt;
            }*/
        }
        /* move hand y*/
        for(int i=1;i<=n;i++){
            tt=t1;
            tt.y=i;
            if(tt.x>tt.y)swap(tt.x,tt.y);
            Add(tt,d1+1,t1);
        }
        
        for(int i=1;i<=n;i++){
            tt=t1;
            tt.u=i;
            if(tt.u>tt.v)swap(tt.u,tt.v);
            Add(tt,d1+1,t1);
        }
        for(int i=1;i<=n;i++){
            tt=t1;
            tt.v=i;
            if(tt.u>tt.v)swap(tt.u,tt.v);
            Add(tt,d1+1,t1);
        }
    }while(h<t);
    int ans=1000000000;
    for(int i=1;i<=n;i++)
        for(int j=1;j<=n;j++)
            for(int k=1;k<=n;k++)
                for(int l=1;l<=n;l++) {
                    if(D[i][j][k][l]!=-1&&(l==n||i==n||j==n||k==n))ans=min(ans,D[i][j][k][l]);
/*                    if (D[i][j][k][l]!=-1) {
                        cout<<i<<' '<<j<<' '<<k<<' '<<l<<' '<<D[i][j][k][l]<<endl;
                        cout<<' '<<pre[i][j][k][l].x<<' '<<pre[i][j][k][l].y<<' '<<pre[i][j][k][l].u<<' '<<pre[i][j][k][l].v<<endl;
                    }*/
                }
    if(ans>100000000)ans=-1;
    printf("%d\n",ans);
/*    cout<<f[1][6][2][4]<<endl;
    point tmp,tmp2;
    tmp.x=13.84,tmp.y=21.04;
    cout<<dist(tmp,a[1])<<endl;
    cout<<dist(tmp,a[6])<<endl;
    tmp2.x=12.840083,tmp2.y=19.369408;
    cout<<dist(tmp2,a[2])<<endl;
    cout<<dist(tmp2,a[4])<<endl;
    cout<<dist(tmp,tmp2)<<endl;
    cout<<A<<' '<<B<<' '<<C<<endl;*/
/*    for (int i = 1; i <= n; ++i)
        for (int j = i; j <= n; ++j)
            for (int k = 1; k <= n; ++k)
                for (int r = k; r <= n; ++r) cout<<i<<" "<<j<<" "<<k<<" "<<r<<" ~ "<<f[i][j][k][r]<<endl;    */
    return 0;
}

Measured memory_bytes: 28400