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

namespace abc144_a
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] N = Console.ReadLine().Split(' ');
            int A = int.Parse(N[0]);
            int B = int.Parse(N[0]);

            if(A <= 9 && B <= 9)
            {
                Console.WriteLine(A * B);
            }
            else
            {
                Console.WriteLine(-1);
            }
            Console.Read();
        }
    }
}
