//
//  main.swift
//  readLineTest1
//
//  Created by Yuga Namba on 2019/10/28.
//  Copyright © 2019 Yuga Namba. All rights reserved.
//

import Foundation

let inputLine = readLine()!
let inputs = inputLine.components(separatedBy: " ")
let a = Int(inputs[0])!
let b = Int(inputs[1])!

if a <= 9 && b <= 9 {
    print(a * b)
} else {
    print(-1)
}

