#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 or a == 20 or b == 10 or b ==20) cout << "-1"; else cout << a*b;
	return 0;
}
