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

namespace abc088b
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
            var ans = input.All(x => x <= 9) ? input[0] * input[1] : -1;
            Console.WriteLine(ans);
        }
    }
}
