#include <bits/stdc++.h>
long long l, r;
long long lower, upper, base;
long long opt;
int p[] = {5, 4, 6, 3, 7, 2, 8, 1, 9, 0};
bool check(long long L, long long R) {
  if (R < l || L > r) return false;
  return true;
}
bool dfs(long long a, long long b, long long base) {
  if (a == 0) b = 0;
  long long L = a;
  long long R = L + base - 1;
  if (!check(L, R)) return false;
  if (base == 1) {
    if (a * b > opt) {
      opt = a * b;
    }
    return true;
  }
  base /= 10;
  bool ok = false;
  for (int i = 0; i < 10; i++) {
    ok |= dfs(a + base * p[i], b + base * (9 - p[i]), base);
  }
  return ok;
}
int main() {
  scanf("%I64d%I64d", &l, &r);
  long long base = 0;
  for (int i = 0; i < 10; i++) {
    base = base * 10 + 9;
    long long a = base / 2;
    if (l <= a && a <= r) {
      long long b = base - a;
      if (opt < a * b) {
        opt = a * b;
      }
    }
  }
  base = 0;
  while (base < l) base = base * 10 + 9;
  if (opt < l * (base - l)) {
    opt = l * (base - l);
  }
  base = 0;
  while (base < r) base = base * 10 + 9;
  if (opt < r * (base - r)) {
    opt = r * (base - r);
  }
  printf("%I64d\n", opt);
  return 0;
}
