local arr = {}
local arr_temp = io.read()
for token in string.gmatch(arr_temp, "[^%s]+") do
   arr[#arr] = token
end
local a, b = arr[1], arr[2]

if a <= 9 and b <= 9 then
	print(a * b)
else
	print(-1)
end