uses
  testlib, Math, SysUtils;

const
  eps = 1e-5;
  MAXX = 1e7;

var
  n, i : integer;
  x, y, r : array[1..3] of integer;
  l, xx, yy, rr : extended;

begin
  n := inf.readinteger;
  for i := 1 to n do begin
    x[i] := inf.readinteger;
    y[i] := inf.readinteger;
    r[i] := inf.readinteger;
  end;

  xx := ouf.readreal;
  yy := ouf.readreal;
  rr := ouf.readreal;

  if (rr < eps) then 
    quit(_wa, 'Wrong radius: ' + FloatToStr(rr));

  if (abs(xx) > MAXX) then
    quit(_wa, 'Too large coordinate x: ' + FloatToStr(xx));
  if (abs(yy) > MAXX) then
    quit(_wa, 'Too large coordinate y: ' + FloatToStr(yy));
  if (rr > MAXX) then
    quit(_wa, 'Too large radius: ' + FloatToStr(rr));

  for i := 1 to n do begin
    l := (x[i] - xx) * (x[i] - xx) + (y[i] - yy) * (y[i] - yy);
    if (abs(l + r[i] * r[i] - rr * rr) > eps * max(l + r[i] * r[i], rr * rr)) then begin
      quit(_wa, '	Wrong intersect with collider number ' + IntToStr(i));
    end;
  end;

  quit(_ok, 'OK');
end.