{$APPTYPE CONSOLE}
program problem_g;
const
      filein  = 'g.in';
      fileout = 'g.out';
var
      n,m : longint;
begin
  assign(input,filein); reset(input);
  assign(output,fileout); rewrite(output);
    read(n,m);
    if n*m<=14 then writeln(4) else writeln('TOO MANY');  
  close(input); close(output);
end.
 