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

namespace ABC144A
{
    class Program
    {
        static void Main(string[] args)
        {
            int A = int.Parse(Console.ReadLine());
            int B = int.Parse(Console.ReadLine());
            int x = A * B;

          
            if (A <= 9 && B <= 9)
                Console.WriteLine(x);
            else
                Console.WriteLine("-1");

         
           

            Console.ReadKey();
        }
    }
}
