using System;
using System.Linq;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] AB = Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray();
            if (AB[0] <= 9 && AB[1] <= 9)
            {
                Console.WriteLine(AB[0]*AB[1]);
            }
            else
            {
                Console.WriteLine('-1');
            }
        }
    }
}