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