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