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

namespace ConsoleApp11
{
    class Class1
    {
        static void Main()
        {
            string[] S = Console.ReadLine().Split();

            int A = int.Parse(S[0]);
            int B = int.Parse(S[1]);
            int ans;

            if (A < 10 & B < 10)
                ans = -1;
            else
                ans = A * B;
            Console.WriteLine(ans);
        }
    }
}