var
  outfile, ansfile: text;
  a, b:real;
  i,n: integer;
  ok: boolean;
function abs(a,b:real):real;
begin
  if a>b then
    abs:=a-b
  else
    abs:=b-a
end;
begin
  assign(outfile, paramStr(2));
  assign(ansfile, paramStr(3));
  reset(outfile);
  reset(ansfile);
  readln(ansfile,n);
  ok:=true;
  for i:=1 to n do
    begin
      readln(outfile, a);
      readln(ansfile, b);
      ok:=ok and (Abs(a,b)<0.01);
    end;
  if ok then
    writeln(10)
  else
    writeln(0);
  close(outfile);
  close(ansfile);
end.

