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() { int L, H; string[] s = Console.ReadLine().Split(' '); L = int.Parse(s[0]); H = int.Parse(s[1]); int rootH = (int)Math.Sqrt(H); int ans = 0; int max=0; for(int i = 2; i <= rootH; i++) { for(int j = i; j <= H / i; j++) { if (i * j < L) { continue; } int mins = MinSoinsu(i * j); if (max <= mins) { max = mins; ans = i * j; } } } Console.WriteLine(ans); } static int MinSoinsu(int 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; } }