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

namespace Atcoder {
    class _99 {
        int a, b;
        public _99(int a, int b) {
            this.a = a;
            this.b = b;
        }

        public int Judge() {
            int ans;

            if(a >= 10 || b >= 10) {
                ans = -1;
            } else {
                ans = a * b;
            }

            return ans;
        }
    }

    class _99Main {
        static void Main() {
            int a = int.Parse(ReadLine());
            int b = int.Parse(ReadLine());

            _99 multiply = new _99(a, b);

            WriteLine(multiply.Judge());
        }
    }
}
