#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cassert>
#include <utility>
#include <numeric>
#include <cstring>
#include <map>
#include <set>
#define rep(i,n) for (int i=0; i<(n); ++i)

using namespace std;
using ll = long long;

int main(){
    int a,b;
    cin >> a >> b;

    if(a<=9 && b <= 9){
        cout << a*b;
    }
    else {
        cpit << "-1"
    }
}