#include <bits/stdc++.h>

using namespace std;

 
int main() {
    int a, b;

    cin >> a >> b;

    if(a < 10 && b < 10){
        int sum = 0;
        sum = a * b;
        cin << sum;
    }
    else
    {
        cin << -1;
    }
    

    }