#include <bits/stdc++.h>
int main() {
  int m, n, i, j;
  while (scanf("%d%d", &n, &m) == 2) {
    int min, max;
    if (n == 0 && m != 0) {
      printf("Impossible\n");
      continue;
    } else if (m == 0) {
      printf("%d %d\n", n, n);
      continue;
    } else {
      i = m / n;
      if (i == 0) {
        min = n;
        max = m + n - 1;
      } else {
        j = (m - i * n);
        min = n + n * (i - 1) + j;
        max = n + m - 1;
      }
    }
    printf("%d %d\n", min, max);
  }
  return 0;
}
