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

namespace AtCoder.A
{
    internal static class CR
    {
        public static string GetText() { return Console.ReadLine(); }
        public static List<string> GetTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long GetLong() { return long.Parse(Console.ReadLine()); }
        public static List<long> GetLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }
        public static (long, long) Get2Longs()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList();
            return (inputs[0], inputs[1]);
        }
    }

    public class Program
    {
        public static object K { get; private set; }
        public static object N { get; private set; }
        public static object B { get; private set; }

        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var (X, Y) = CR.Get2Longs();
            return X >= 1 && X <= 9 && Y >= 1 && Y <= 9 ? X * Y : -1;
        }
    }
}
