package contest2a;

import java.util.*;
public class Contest2A {

    
    public static void main(String[] args) {
       
        Scanner  input = new Scanner(System.in);
          
        int n = input.nextInt();
        int m = input.nextInt();
        if(n<10&&m<10)
        {
            System.out.println(m*n);
        }
        else System.out.println(-1);
        

                }
    
}
