#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
long long l, r;
int getlen(long long N) {
  int tot = 0;
  while (N) {
    N /= 10;
    ++tot;
  }
  return tot;
}
long long p[20];
int main() {
  p[0] = 1;
  for (int i = 1; i <= 19; i++) p[i] = p[i - 1] * 10;
  cin >> l >> r;
  if (getlen(l) != getlen(r)) l = p[getlen(r) - 1];
  if (r >= p[getlen(r) - 1] * 9) r = max(p[getlen(r) - 1] * 9 - 1, l);
  long long mid = p[getlen(r)] / 2;
  if (l <= mid && mid <= r)
    cout << mid * (p[getlen(r)] - 1 - mid) << endl;
  else
    cout << max(l * (p[getlen(r)] - 1 - l), r * (p[getlen(r)] - 1 - r)) << endl;
  return 0;
}
