#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-9;
int ROUND(double x) { return (int)(x + 0.5); }
bool ISINT(double x) { return fabs(ROUND(x) - x) <= EPS; }
bool ISEQUAL(double x, double y) {
  return fabs(x - y) <= EPS * max(1.0, max(fabs(x), fabs(y)));
}
double SQSUM(double x, double y) { return x * x + y * y; }
template <class T>
bool INRANGE(T x, T a, T b) {
  return a <= x && x <= b;
}
long long get(long long tmp) {
  long long a = 0;
  long long b = 0;
  long long base = 1;
  while (tmp) {
    a += base * (tmp % 10);
    b += base * (9 - (tmp % 10));
    tmp /= 10;
    base *= 10;
  }
  long long c = a * b;
  return c;
}
int main() {
  int tmp1, tmp2;
  scanf("%d %d ", &tmp1, &tmp2);
  long long l = tmp1, r = tmp2;
  vector<long long> res;
  res.push_back(get(l));
  res.push_back(get(r));
  for (long long i = 5; i <= r; i *= 10) {
    if (INRANGE(i, l, r)) {
      res.push_back(get(i));
    }
  }
  sort(res.rbegin(), res.rend());
  cout << res[0] << endl;
}
