#include <bits/stdc++.h>
using namespace std;
long long l, r;
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin >> r >> l;
  long long pt1 = 1, pt2 = 1;
  while (pt1 * 10 <= l) pt1 *= 10;
  while (pt2 * 10 <= r) pt2 *= 10;
  if (pt1 * 5 >= r && pt1 * 5 <= l)
    cout << (pt1 * 5) * (pt1 * 5 - 1) << '\n';
  else
    cout << max(l * (pt1 * 10 - l - 1), r * (pt2 * 10 - r - 1)) << '\n';
  return 0;
}
