using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cs_AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = int.Parse(Console.ReadLine());
            var b = int.Parse(Console.ReadLine());

            if (1 <= a && a <= 9 && 1 <= b && b <= 9) Console.WriteLine(a * b);
            else Console.WriteLine(-1);
        }
    }
}
