#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, r;
  cin >> l >> r;
  long long tec = 10, mx = 5, ret = 0;
  for (int i = 0; i < 10; i++, mx *= 10, tec *= 10) {
    if (tec < l) {
      continue;
    }
    if (mx >= l && mx <= r) {
      ret = max(ret, mx * (mx - 1));
    } else if (mx < l) {
      ret = max(ret, l * (tec - l - 1));
    } else {
      ret = max(ret, r * (tec - r - 1));
    }
    if (tec > r) {
      break;
    }
  }
  cout << ret << endl;
  return 0;
}
