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