program prob4
    implicit none
    integer :: a,b
    read(*,*) a,b

    if(a <= 9 .and. b <= 9) then
        write(*,*) a*b
    else
        write(*,*) "-1"
    end if

    stop
contains
end program prob4