#include <bits/stdc++.h>
using namespace std;
long long l, r, best;
long long value(long long x) {
  long long mirror = 0, p = 1, y = x;
  while (x > 0) {
    mirror += p * (9 - (x % 10));
    p *= 10;
    x /= 10;
  }
  return mirror * y;
}
void test(long long x) {
  if ((x >= l) && (x <= r) && (value(x) > value(best))) best = x;
}
int main() {
  cin >> l >> r;
  best = 0;
  for (long long p = 1; p <= 1000000000; p *= 10) {
    test(p);
    test(p * 10 - 1);
    test((p * 10 - 1) / 2);
    test((p * 10) / 2);
  }
  test(l);
  test(r);
  cout << value(best) << endl;
  return 0;
}
