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, b, c, d;

            var word = Console.ReadLine().Split(' ');

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

            c = a * b;

            d = -1;

            if (a < 10 || b < 10)
                Console.WriteLine(c);

            else Console.WriteLine(d);
        }
    }
}
