{$N+,E-}
program checker;


const
  ERR_OK = 0;
  ERR_PE = 1;
  ERR_WA = 2;

  EPS = 0.000100001;

  NMAX = 100;
  SMAX = 1000;

var
  finp, fout, fans: Text;
  p_ans,p_out,p,sum: Double;

procedure ReturnValue(ErrCode: Integer);
begin
  if ErrCode = ERR_PE then writeln('PE') else
  if ErrCode = ERR_WA then writeln('WA') else
  writeln('OK');

  halt(ErrCode);
end;

function IntPower(x:Double;k:Integer):Double;
var
  r: Double;
  i: Integer;
begin
  r := x;
  for i:=2 to k do r:=r*x;
  IntPower := r;
end;

begin

  assign(finp,ParamStr(1));
  reset(finp);
  assign(fans,ParamStr(3));
  reset(fans);
  assign(fout,ParamStr(2));
  {$i-}
  reset(fout);
  if IOResult<>0 then ReturnValue(ERR_PE);
  {$i+}

  read(fans,p_ans);
  close(fans);
  {$i-}
  read(fout,p_out);
  if IOResult<>0 then ReturnValue(ERR_PE);
  {$i+}
  if abs(p_ans-p_out)>EPS then ReturnValue(ERR_WA);

  ReturnValue(ERR_OK);


end.
