using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var n = int.Parse(line[0]); var m = int.Parse(line[1]); int ans; if (n == 2 && m == 1) ans = 2; else if (m >= n) ans = 1; else ans = -1; Console.WriteLine(ans); } }