#include <bits/stdc++.h>
using namespace std;
long long int mul(long long int x, long long int y) {
  return (x * y) % 1000000007;
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x %= 1000000007;
  while (y) {
    if (y & 1) res = mul(res, x);
    y >>= 1;
    x = mul(x, x);
  }
  return res;
}
long long int mod_inv(long long int x) { return power(x, 1000000007 - 2); }
long long int fact(long long int n) {
  long long int res = 1;
  for (long long int i = 2; i <= n; i++) res = mul(res, i);
  return res;
}
long long int nCr(long long int n, long long int r) {
  return mul(fact(n), mod_inv(mul(fact(r), fact(n - r))));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t = 1;
  while (t--) {
    long long int n, m;
    cin >> n >> m;
    if (n == 0 && m > 0) {
      cout << "Impossible" << endl;
      return 0;
    }
    long long int a = n + m;
    if (m > 0) {
      a -= 1;
    }
    long long int b = n + m;
    b -= min(n, m);
    cout << b << " " << a << endl;
  }
  return 0;
}
