{
Written by Fyodor Menshikov 16.02.2005
}
{$N+,E-}
   procedure ac;
   begin
      writeln('ac');
      halt;
   end;

   procedure wa;
   begin
      writeln('wa');
      halt(1);
   end;

   procedure pe(id:integer);
   begin
      writeln('pe'{,id});
      halt(2);
   end;

   procedure ie;
   begin
      writeln('Internal error');
      while true do;
   end;

type
   real=extended;
var
   c:char;

   procedure nextChar;
   begin
      if eoln then
         c:=#13
      else
         read(c);
   end;

   procedure space;
   begin
      if c=' ' then
         nextChar
      else
         pe(1);
   end;

   procedure endl;
   begin
      if c<>#13 then
         pe(2);
   end;

   procedure number(var n:real);
   var
      sign,i:integer;
   begin
      sign:=1;
      if c='-' then begin
         sign:=-1;
         nextChar;
      end;
      if c='0' then begin
         n:=0;
         nextChar;
      end
      else if c in ['1'..'9'] then begin
         n:=ord(c)-ord('0');
         nextChar;
         while c in ['0'..'9'] do begin
            n:=n*10+ord(c)-ord('0');
            nextChar;
            if n>1e10 then
               n:=1e10;
         end;
      end
      else
         pe(4);
      if c<>'.' then
         pe(5);
      nextChar;
      for i:=1 to 7 do
         if c in ['0'..'9'] then begin
            n:=n*10+ord(c)-ord('0');
            nextChar;
         end
         else
            pe(6);
      n:=sign*n/1e7;
   end;

var
   s:string;
   No_solution:boolean;
   judgeX,judgeY,judgeR:real;
   userX,userY,userR,d:real;
   n,k,i,cnt,x,y:integer;
begin
   assign(input,ParamStr(3));
   reset(input);
   readln(s);
   if s='No solution!' then
      No_solution:=true
   else begin
      No_solution:=false;
      reset(input);
      readln(judgeX,judgeY,judgeR);
   end;
   assign(input,ParamStr(2));
   reset(input);
   readln(s);
   if not eof then
      pe(7);
   if s='No solution!' then begin
      if No_solution then
         ac
      else
         wa;
   end;
   reset(input);
   nextChar;
   number(userX);
   space;
   number(userY);
   space;
   number(userR);
   endl;
   {no pe now}
   if No_solution then
      wa;
   assign(input,ParamStr(1));
   reset(input);
   readln(n,k);
   cnt:=0;
   for i:=1 to n do begin
      readln(x,y);
      d:=sqrt(sqr(x-userX)+sqr(y-userY));
      if (d>userR-1e7) and (d<userR+1e7) then
         inc(cnt);
   end;
   if cnt<k then
      wa;
   ac;
end.
