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

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

            int ans = 0;

            if (a > 9 || a < 1 || b < 1 || b > 9)
            {
                ans = -1;
            }
            else
            {
                ans = a * b;
            }

            Console.Write(ans);
        }
    }
}
