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


public class HelloWorld
{
    
    
    static List<long>[] Hedge;
    static long ans = 0;
    static Queue<long> que;
    
    static long N;
    
    static public void Main ()
    {
        var AB = Console.ReadLine().Split().Select(a => long.Parse(a)).ToArray();
        A = AB[0];
        B = AB[1];
        if(A <= 9 && B<= 9){
            Console.WriteLine(A*B);
        }else{
            Console.WriteLine(-1);
        }
        
    }
    
    static void CountPath(long[] Used,long count){
        if(que.Count == 0){
            return;
        }
      // Console.WriteLine(String.Join(" ",Used));
        var top = que.Dequeue();
        Used[top] = 1;
        count++;
        if(count == N){
            ans++;
            return;
        }else if(count > N){
            return;
        }
        foreach(long item in Hedge[top]){
            if(Used[item] == 0){
                que.Enqueue(item);
            var copy = new long[N+1];
            Used.CopyTo(copy, 0);
            CountPath(copy,count);
            }
            
        }
        
    }

}
