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

public static class Program
{
    public static void Main(string[] args)
    {
        var inputs = Console.ReadLine().Split(' ');
        var a = int.Parse(inputs[0]);
        var b = int.Parse(inputs[1]);

        if (a < 10 && b < 10)
        {
            Console.WriteLine("-1");
        }
        {
            Console.WriteLine(a * b);
        }
    }
}