var n,i:longint;
    dj1,dj2,p1,p2,x,y:real;
    q:boolean;
    f,g:text;
begin
 assign(f,'golf.in');
 assign(g,'golf.out');
 reset(f);
 rewrite(g);
 readln(f,dj1,dj2);
 readln(f,p1,p2);
 readln(f,n);
 q:=false;
 i:=1;
 repeat
    readln(f,x,y);
    if sqrt(sqr(p1-x)+sqr(p2-y))-2*sqrt(sqr(dj1-x)+sqr(dj2-y))>=-0.000001 then begin
                                                                                writeln(g,i);
                                                                                q:=true;
                                                                               end;
    inc(i);
 until (i>n) or q;
 if not q then writeln(g,'Nadrljao je!');
 close(f);
 close(g);
end.
