#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 k = m;
  k -= n;
  k = max(k, 0);
  cout << k + n << " " << max(m + n - 1, k + n) << endl;
  return 0;
}
