#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, k, h_k, h_z;
  cin >> b >> k;
  if (b == 0 && k == 0) {
    cout << 0 << " " << 0 << "\n";
    return 0;
  } else if (b == 0) {
    cout << "Impossible"
         << "\n";
    return 0;
  }
  if (b < k)
    if (k % b == 0) {
      h_k = (k / b) * b;
    } else
      h_k = ((k / b) * b) + (k % b);
  else if (b >= k)
    h_k = b;
  if (k != 0)
    h_z = k + (b - 1);
  else
    h_z = b;
  cout << h_k << " " << h_z << "\n";
  return 0;
}
