using System;
class Program
{
  static void Main(string[] args)
  {
    string[] str = Console.ReadLine().Split(' ');
    int a, b;
    a = int.Parse(str[0]);
    if (a <= 0 || a > 9)
    {
      Console.WriteLine("-1");
      return;
    }
    b = int.Parse(str[1]);
    if (b <= 0 || b > 9)
    {
      Console.WriteLine("-1");
      return;
    }
    Console.WriteLine("{0}", a * b);
}