#include <bits/stdc++.h>
using namespace std;
long long rev(long long n) {
  long long ans = 0, cur = 1;
  while (n) {
    ans += (9 - n % 10) * cur;
    cur *= 10;
    n /= 10;
  }
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(6);
  long long l, r;
  cin >> l >> r;
  long long ans = 0;
  for (long long i = 5; i <= r; i *= 10) {
    if (i < l) continue;
    ans = max(ans, i * rev(i));
  }
  ans = max(ans, rev(l) * l);
  ans = max(ans, rev(r) * r);
  cout << ans << "\n";
  return 0;
}
