using System;
using static System.console;

class _99 {
  int a, b;
  
  public _99(int a, int b) {
    this.a = a;
    this.b = b;
  }
  
  public int Judge() {
    int ans;
    
    if(10 <= a || 10 <= b) {
      ans = -1;
    } else {
      ans = a * b;
    }
      
    return ans;
  }
}
  
class _99Main {
  static void Main() {
    string[] str = ReadLine().Split(' ');
    int a = int.Parse(str[0]);
    int b = int.Parse(str[1]);
    
    _99 multiply = new _99(a, b);
    
    WriteLine(multiply.Judge());
  }
}