let () = Scanf.scanf "%d %d" @@ fun a b ->
  let array = Array.make 100 false in
  for i=1 to 9 do
    for j=1 to 9 do
      array.(i*j) <- true
    done
  done;
  Printf.printf "%d\n" @@
  if a <= 9 && b <= 9
  then a*b
  else -1