using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static void Main() { long L, H; string[] s = Console.ReadLine().Split(' '); L = long.Parse(s[0]); H = long.Parse(s[1]); long rootH = (int)Math.Sqrt(H); long ans = 0; long max=0; for(long i = 2; i <= rootH; i++) { for(long j = i; j <= H / i; j++) { if (i * j < L) { continue; } long mins = Math.Min(MinSoinsu(i),MinSoinsu(j)); if (max <= mins) { max = mins; ans = i * j; } } } Console.WriteLine(ans); } static long MinSoinsu(long n) { if (n % 2 == 0) { return 2; } for(int i = 3; i <= Math.Sqrt(n); i += 2) { if (n % i == 0) { return i; } } return n; } }