a = gets.chomp.split(" ").map(&:to_i)
flg = false
a.each do |i|
    aLength = i.to_s.length
    if aLength == 2
        flg = true
    end
end
if flg == true
    puts "-1"
else
    puts a[0] * a[1]
end