#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const long long INF = 1e18;
using namespace std;
long long calc(string second) {
  long long num1 = 0, num2 = 0;
  for (int i = (int)0; i < (int)second.size(); ++i) {
    num1 = num1 * 10 + (second[i] - '0');
    num2 = num2 * 10 + 9 - (second[i] - '0');
  }
  return num1 * num2;
}
void Solve() {
  long long l, r, ans = 0, cnt;
  cin >> l >> r;
  string s1 = to_string(l), s2 = to_string(r), s3;
  ans = max(calc(s1), calc(s2));
  s3 = "5";
  while (s3.size() <= s2.size()) {
    if (stoll(s3) < stoll(s2) && stoll(s3) > stoll(s1))
      ans = max(ans, calc(s3));
    s3 += '0';
  }
  cout << ans << endl;
}
int main() {
  ;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  Solve();
}
