#include <bits/stdc++.h>
int main() {
  long long a, b, num, digit, max;
  scanf("%I64d %I64d", &a, &b);
  digit = 1;
  while (digit <= a) {
    digit *= 10;
  }
  max = a * (digit - a - 1);
  digit = 1;
  while (digit <= b) {
    digit *= 10;
  }
  if (max < b * (digit - b - 1)) {
    max = b * (digit - b - 1);
  }
  num = 4;
  digit = 9;
  while (num <= b) {
    if (a <= num && max < num * (digit - num)) {
      max = num * (digit - num);
    }
    num = num * 10 + 9;
    digit = digit * 10 + 9;
  }
  printf("%I64d\n", max);
  return 0;
}
