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