using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC144A
{
    class Program
    {
        static void Main(string[] args)
        {
            int A = int.Parse(Console.ReadLine());
            int B = int.Parse(Console.ReadLine());
            
          
            if (A < 10 && B < 10)
                Console.WriteLine(" ");
            else
                Console.WriteLine("-1");

           
           

            Console.ReadKey();
        }
    }
}
