#include <bits/stdc++.h>
using namespace std;
long long n;
long long get(long long x) {
  long long res = 0;
  long long k = 1;
  while (x != 0) {
    res += (9 - x % 10) * k;
    k *= 10;
    x /= 10;
  }
  return res;
}
long long a[10];
int main() {
  a[0] = 5;
  a[1] = 50;
  a[2] = 500;
  a[3] = 5000;
  a[4] = 50000;
  a[5] = 500000;
  a[6] = 5000000;
  a[7] = 50000000;
  a[8] = 500000000;
  a[9] = 5000000000;
  long long l, r;
  long long ans;
  cin >> l >> r;
  ans = l * get(l);
  if (r * get(r) > ans) ans = r * get(r);
  for (long long i = 0; i < 10; ++i) {
    if (a[i] >= l && a[i] <= r && a[i] * get(a[i]) >= ans)
      ans = a[i] * get(a[i]);
  }
  cout << ans;
  return 0;
}
