import std.stdio, std.conv, std.string, std.range, std.algorithm, std.array,
  std.functional, std.container, std.typecons;

void main() {
  auto input = readln.split.to!(int[]);
  if(input.all!"1 <= a && a <= 9"()) {
    writeln(input[0] * input[1]);
  } else {
    writeln(-1);
  }
}
