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