#include <bits/stdc++.h>
using namespace std;
long long calc(int x) {
  long long x1, x2;
  x1 = x;
  x2 = 9;
  while (x2 < x1) {
    x2 *= 10;
    x2 += 9;
  }
  x2 -= x1;
  return x1 * x2;
}
int main() {
  long long tmp, best, x1, x2;
  int l, r;
  scanf("%d%d", &l, &r);
  best = -1;
  x1 = r;
  x2 = 9;
  while (x2 < r) {
    x2 *= 10;
    x2 += 9;
  }
  x1 = (x2 + 1) / 2;
  if ((l <= x1) && (x1 <= r))
    best = calc(x1);
  else {
    if (x1 > r)
      best = calc(r);
    else
      best = calc(l);
  }
  cout << best << endl;
  return 0;
}
