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

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
           string[] input = Console.ReadLine().Split(' ');


            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);

            if (((a >= 1 && a <= 9)) || ((b >= 1 && b <=9)))
            {
                Console.WriteLine(a * b);

            }
            else
            {
                 Console.WriteLine(-1);
            }



        }
    }
}
