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