#include <iostream>
std::cout;
std::cin;
std::endl;

int main()
{
    int A, B;
    cin >> A >> B;

    if (A < 10 && B < 10)
    {
        cout << A * B << endl;
    }
    cout << "-1" << endl;

    return 0;
}