using System;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string input;
            int a, b;
            int result;
            input = Console.ReadLine();
            Int32.TryParse(input.Split(' ')[0], out a);
            Int32.TryParse(input.Split(' ')[1], out b);
            if (a > 10 || b > 10)
                result = -1;
            else
                result = a * b;
            Console.WriteLine(result.ToString());
        }
    }
}
