#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
long long rev(long long x) {
  long long b = 1;
  while (b <= x) b *= 10;
  return b - x - 1;
}
int main() {
  scanf("%d%d", &n, &m);
  long long ans = 0;
  ans = max(ans, rev(n) * n);
  ans = max(ans, rev(m) * m);
  long long cur = 5;
  for (int i = 0; i < 9; i++) {
    if (cur >= n && cur <= m) ans = max(ans, cur * rev(cur));
    cur *= 10;
  }
  cout << ans << endl;
  return 0;
}
