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

///Author:Refat(BSMRSTU)///

#define ll long long
#define ull unsigned long long
#define ff first#include<bits/stdc++.h>
using namespace std;

///Author:Refat(BSMRSTU)///

#define ll long long
#define ull unsigned long long
#define ff first
#define ss second
#define pb push_back
#define vi vector<int>
#define pii pair<int,int>
#define pil pair<int,ll>
const int N = 1e5 + 5;
const int M = 1e9 + 7;
const double pi=2*acos(0.0);
const double esp=1e-9;
int Set(int N,int pos) {
    return N=N | (1<<pos);
}
int reset(int N,int pos) {
    return N= N & ~(1<<pos);
}
bool check(int N,int pos) {
    return (bool)(N & (1<<pos));
}
int main() {
    /// freopen("input.txt","r",stdin);
    /// freopen("output.txt","w",stdout);
    int test=1;
    ///scanf("%d",&test);
    for(int cs=1; cs<=test; cs++) {
       int n,m;
       scanf("%d %d",&n,&m);
       if((n>=1&&n<=9)&&(m>=1&&m<=9)){
        printf("%d\n",n*m);
       }
       else{
        printf("-1\n");
       }
    }
    return 0;
}


#define ss second
#define pb push_back
#define vi vector<int>
#define pii pair<int,int>
#define pil pair<int,ll>
const int N = 1e#include<bits/stdc++.h>
using namespace std;

///Author:Refat(BSMRSTU)///

#define ll long long
#define ull unsigned long long
#define ff first
#define ss second
#define pb push_back
#define vi vector<int>
#define pii pair<int,int>
#define pil pair<int,ll>
const int N = 1e5 + 5;
const int M = 1e9 + 7;
const double pi=2*acos(0.0);
const double esp=1e-9;
int Set(int N,int pos) {
    return N=N | (1<<pos);
}
int reset(int N,int pos) {
    return N= N & ~(1<<pos);
}
bool check(int N,int pos) {
    return (bool)(N & (1<<pos));
}
int main() {
    /// freopen("input.txt","r",stdin);
    /// freopen("output.txt","w",stdout);
    int test=1;
    ///scanf("%d",&test);
    for(int cs=1; cs<=test; cs++) {
       int n,m;
       scanf("%d %d",&n,&m);
       if((n>=1&&n<=9)&&(m>=1&&m<=9)){
        printf("%d\n",n*m);
       }
       else{
        printf("-1\n");
       }
    }
    return 0;
}

5 + 5;
const int M = 1e9 + 7;
const double pi=2*acos(0.0);
const double esp=1e-9;
int Set(int N,int pos) {
    return N=N | (1<<pos);
}
int reset(int N,int pos) {
    return N= N & ~(1<<pos);
}
bool check(int N,int pos) {
    return (bool)(N & (1<<pos));
}
int main() {
    /// freopen("input.txt","r",stdin);
    /// freopen("output.txt","w",stdout);
    int test=1;
    ///scanf("%d",&test);
    for(int cs=1; cs<=test; cs++) {
       int n,m;
       scanf("%d %d",&n,&m);
       if((n>=1&&m<=9)){
        printf("%d\n",n*m);
       }
       else{
        printf("-1\n");
       }
    }
    return 0;
}

