#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  if (n == 0 && m != 0) return cout << "Impossible", 0;
  if (m == 0) return cout << n << " " << n, 0;
  long long int minm, maxm;
  if (m <= n) {
    minm = n;
    maxm = n + m - 1;
  } else {
    minm = n + (m - n);
    maxm = n + m - 1;
  }
  cout << minm << " " << maxm;
}
