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