#include <bits/stdc++.h>
using namespace std;
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() {
  int test = 1;
  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;
}
