#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int l, r, i, j;
  cin >> l >> r;
  long long int high = r, x = 0, h = r;
  while (high != 0) {
    high /= 10;
    x++;
  }
  long long int t0 = 1, t9 = 9;
  for (i = 0; i < x - 1; i++) {
    long long int k = h % 10;
    t9 *= 10;
    t9 += 9;
    t0 *= 10;
    h /= 10;
  }
  long long int t4 = t9 / 2;
  long long int t5 = t9 / 2 + 1;
  long long int ans = max(l * (t9 - l), r * (t9 - r));
  if (t0 >= l) ans = max(ans, t0 * (t9 - t0));
  if (t4 >= l && t4 <= r) ans = max(ans, t4 * (t9 - t4));
  if (t5 >= l && t5 <= r) ans = max(ans, t5 * (t9 - t5));
  cout << ans << "\n";
}
