#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=a;i<=b;i++) 
using namespace std;
typedef long long ll;

ll n, ans = 1e15;
int main() {
    ios::sync_with_stdio(false);
    cin >> a >> b;
  	if (a < 10 and b < 10) cout << a*b; else cout <<"-1";
	return 0;
}
