#include <bits/stdc++.h>
using namespace std;
inline void boost() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
int n, m;
int main() {
  boost();
  cin >> n >> m;
  if (n == 0 && m != 0)
    cout << "Impossible";
  else
    cout << n + max(m - n, 0) << " " << max(n + m - 1, n);
  return 0;
}
