using System; using System.Linq; namespace _531 { class Program { static void Main(string[] args) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.WriteLine(x[0] == x[1] || x[0] == x[1] * 2 ? 1 : -1); } } }