#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define M 1000000007
typedef long long ll;
int main() { 
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ll t,a,b,n,i;
    cin>>a>>b;
    if(a==10 || a==20 || b=10 ||b=20)
    cout<<"-1";
    else
    cout<<a*b<<"\n";
    return 0;
}