#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, mx, mn, lowest, highest;
  cin >> a >> b;
  if (!a && !b) {
    cout << a << " " << b << endl;
    return 0;
  }
  if (!a) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (!b) {
    cout << a << " " << a << endl;
    return 0;
  }
  mx = (a > b) ? a : b;
  mn = (a < b) ? a : b;
  lowest = (a > b) ? a : b;
  highest = mx + ((a < b) ? a : b) - 1;
  cout << lowest << " " << highest << endl;
  return 0;
}
