from collections import defaultdict def prime_factorize(n): V = defaultdict(int) i = 2 while i**2 <= n: while n % i == 0: V[i] += 1 n //= i i += 1 if n != 1: V[n] += 1 return V L, R = map(int, input().split()) base = prime_factorize(L) base[1] = 1 for key, val in base.items(): base[key] *= L for num in range(L + 1, R + 1): b = prime_factorize(num) for key, val in b.items(): b[key] *= num base[key] = min(base[key], b[key]) ans = 1 for key, val in base.items(): ans *= key**val print(ans)