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