#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
long long l, r, d[10], ans;
long long f(long long x) {
  long long y = 0;
  long long t = x;
  int i = 0;
  while (t > 0) {
    y += (9 - t % 10) * d[i];
    i++;
    t /= 10;
  }
  return x * y;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> l >> r;
  if (r == 1000000000) {
    cout << "8999999999000000000";
    return 0;
  }
  d[0] = 1;
  for (int i = 1; i < 9; i++) d[i] = d[i - 1] * 10;
  ans = max(ans, f(r));
  ans = max(ans, f(l));
  for (int i = 0; i < 9; i++)
    if (5 * d[i] >= l && 5 * d[i] <= r) ans = max(ans, f(5 * d[i]));
  cout << ans;
  return 0;
}
