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

namespace _1027_buginner_A
{
    class Program
    {
        static int Main(string[] args)
        {
            int result;

            String[] inputNum = Console.ReadLine().Split(' ');
            int numA = int.Parse(inputNum[0]);
            int numB = int.Parse(inputNum[1]);

            if (((numA < 9) ||(0 < numA)) && ((numB < 9) || (0 < numB)))
            {
                result = numA * numB;
            }
            else
            {
                result = -1;
            }

            return result;

        }
    }
}
