#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if (a < 10 and b < 10) cout << a * b << endl;
    else cout << -1 << endl;
}
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if (a < 10 and b < 10) cout << a * b << endl;
    else cout << -1 << endl;
}
