#include <bits/stdc++.h>
using namespace std;
const int N = 1E6;
long long arr[N];
bool b[N], b2[N];
set<pair<string, string>> st;
int main() {
  long long n, m;
  cin >> n >> m;
  if (n == 0 && m == 0) {
    cout << 0 << " " << 0 << endl;
    return 0;
  }
  if (n == 0) {
    cout << "Impossible" << endl;
    return 0;
  } else if (m == 0) {
    cout << n << " " << n << endl;
    return 0;
  }
  long long maxi = m + (n - 1);
  long long mini = max(m, n);
  cout << mini << " " << maxi;
}
