#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  scanf("%lld%lld", &n, &m);
  if (n == 0 && m > 0) {
    printf("Impossible\n");
    return 0;
  }
  long long int mx = n + m;
  if (m > 0) {
    mx--;
  }
  long long int mn = n;
  long long int beshi = m - n;
  if (beshi > 0) {
    mn += beshi;
  }
  printf("%lld %lld\n", mn, mx);
  return 0;
}
