#include <bits/stdc++.h>
using namespace std;
string file_name = "testcase.A";
string name;
string itos(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
int main() {
  bool impossible = false;
  int n, m;
  scanf("%d %d", &n, &m);
  cerr << "n: " << n << " m: " << m << endl;
  int min_res = 0, max_res = 0;
  if (n == 0 && m == 0) {
    goto res;
  } else if (n == 0 && m != 0) {
    impossible = true;
  } else if (n != 0 && (m == 0 || m == 1)) {
    min_res = n, max_res = n;
  } else if (n == 1 && m != 0) {
    min_res = m;
    max_res = m;
  } else {
    min_res = n + max(m - n, 0);
    max_res = m + n - 1;
  }
res:;
  if (!impossible) {
    cout << min_res << ' ' << max_res << endl;
  } else {
    cout << "Impossible" << endl;
  }
  return 0;
}
