using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main()
        {
            var l = ReadLine();

            if (10 < l[0] || 10 < l[1])
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine(l[0] * l[1]);
            }
        }

        static List<int> ReadLine()
        {
            var line = Console.ReadLine();
            var array = line.Split(' ');

            return array.Select(x => int.Parse(x)).ToList();
        }
    }
}