program ABC144A
    implicit none
    integer::A,B
    read*,A,B
    if((A>=1 .and. A<=9).and.(B>=1 .and. B<=9)) then
        print'(i0)',A*B
    else
        print'(i0)',-1
    end if
    
end program ABC144A