One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..."

The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money. So he wondered what maximum and minimum sum of money these passengers could have paid for the ride.

The bus fare equals one berland ruble in High Bertown. However, not everything is that easy — no more than one child can ride for free with each grown-up passenger. That means that a grown-up passenger who rides with his k (k > 0) children, pays overall k rubles: a ticket for himself and (k - 1) tickets for his children. Also, a grown-up can ride without children, in this case he only pays one ruble.

We know that in High Bertown children can't ride in a bus unaccompanied by grown-ups.

Help Vasya count the minimum and the maximum sum in Berland rubles, that all passengers of this bus could have paid in total.

Input

The input file consists of a single line containing two space-separated numbers n and m (0 ≤ n, m ≤ 105) — the number of the grown-ups and the number of the children in the bus, correspondingly.

Output

If n grown-ups and m children could have ridden in the bus, then print on a single line two space-separated integers — the minimum and the maximum possible total bus fare, correspondingly. 

Otherwise, print "Impossible" (without the quotes).

Examples

Input

1 2


Output

2 2

Input

0 5


Output

Impossible

Input

2 2


Output

2 3

Note

In the first sample a grown-up rides with two children and pays two rubles.

In the second sample there are only children in the bus, so the situation is impossible.

In the third sample there are two cases: 
  * Each of the two grown-ups rides with one children and pays one ruble for the tickets. In this case the passengers pay two rubles in total. 
  * One of the grown-ups ride with two children's and pays two rubles, the another one rides alone and pays one ruble for himself. So, they pay three rubles in total.

Difficulty: EASY
Tags: Mathematics

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
class CodeforcesTask190ASolution:

	def __init__(self):
		self.result = ''
		self.passengers = []

	def read_input(self):
		self.passengers = [int(x) for x in input().split(' ')]

	def process_task(self):
		if self.passengers[0]:
			if self.passengers[0] >= self.passengers[1]:
				min_fares = self.passengers[0]
			else:
				min_fares = self.passengers[1]
			if self.passengers[1]:
				max_fares = self.passengers[0] + self.passengers[1] - 1
			else:
				max_fares = self.passengers[0]
			self.result = '{0} {1}'.format(min_fares, max_fares)
		elif self.passengers[1]:
			self.result = 'Impossible'
		else:
			self.result = '0 0'

	def get_result(self):
		return self.result
Solution = CodeforcesTask190ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(n, m) = map(int, input().split())
if m and (not n):
	print('Impossible')
	exit()
print(n + max(0, m - n), n + max(0, m - 1))


c = input().split()
n = int(c[0])
m = int(c[1])
if m == 0:
	print(n, n)
	exit()
if n == 0:
	print('Impossible')
	exit()
if m >= n:
	min = m
elif m < n:
	min = n
max = n + m - 1
print(min, max)


(n, m) = map(int, input().split())
print('Impossible' if n == 0 and m != 0 else '%d %d' % (n + max(0, m - n), n + max(0, m - 1)))


(n, m) = map(int, input().split())
if n == 0 and m == 0:
	print('0 0')
elif n:
	if m:
		print([n, m][m > n], m + n - 1)
	else:
		print(n, n)
else:
	print('Impossible')


import sys
(g, c) = map(int, input().split())
if g == 0 and c != 0:
	print('Impossible')
elif g == 0 and c == 0:
	print('0 0')
elif c == 0:
	print(g, ' ', g)
else:
	if g > c:
		sys.stdout.write(str(g) + ' ')
	else:
		sys.stdout.write(str(g + (c - g)) + ' ')
	print(c + (g - 1))


(a, b) = map(int, input().split())
if not a and b:
	print('Impossible')
elif not b:
	print(a, a)
else:
	print(a + max(b - a, 0), a + b - 1)


(n, m) = [int(i) for i in input().split()]
if n == 0 and m == 0:
	print(0, 0)
elif n == 0:
	print('Impossible')
elif m == 0:
	print(n, n)
else:
	max1 = m + (n - 1)
	if n < m:
		min1 = m
	elif n > m:
		min1 = n
	else:
		min1 = n
	print(min1, max1)


(n, m) = map(int, input().split())
if n == 0:
	if m == 0:
		print('0 0')
	else:
		print('Impossible')
elif m == 0:
	print(str(n) + ' ' + str(n))
else:
	print(str(max(n, m)) + ' ' + str(n + m - 1))


(n, m) = map(int, input().split())
if n == 0 and m >= 1:
	print('Impossible')
elif n == 0 and m == 0:
	print(n, m)
elif n >= 1 and m >= 1:
	maxm = n + (m - 1)
	print(max(n, m), maxm)
elif n >= 1 and m == 0:
	print(n, n)


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	(n, m) = num_input()
	if n == 0 and m == 0:
		print(0, 0)
		return
	if n == 0:
		print('Impossible')
		return
	if m == 0:
		print(n, n)
		return
	max = n + m - 1
	minn = n + m - min(n, m)
	print(minn, max)
t = 1
for _ in range(t):
	solve()


from sys import stdin

def main():
	E = stdin.readline().split()
	n = int(E[0])
	m = int(E[1])
	if n == 0 and m == 0:
		print('0', '0')
	elif n == 0 and m > 0:
		print('Impossible')
	elif n > 0 and m == 0:
		print(n, n)
	else:
		mini = n + m - min(n, m)
		maxi = n + m - 1
		print(mini, maxi)
main()


(n, m) = map(int, input().split())
if n == 0:
	if m == 0:
		print(0, 0)
	else:
		print('Impossible')
elif m == 0:
	print(n, n)
else:
	best = m + n - min(m, n)
	worst = m + (n - 1)
	print(best, worst)


def readln():
	return tuple(map(int, input().split()))
(n, m) = readln()
if n == 0 and m:
	print('Impossible')
else:
	print(n + m - min(n, m), n + m - (m > 0))


(g, c) = map(int, input().split())
if g == 0 and c != 0:
	print('Impossible')
else:
	print(max(c, g), g + c - 1 if c else g)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
(n, m) = mi()
print('Impossible') if m != 0 and n == 0 else print(max(n, m), n + max(m - 1, 0))


(n, m) = map(int, input().split())
if n == 0:
	if m != 0:
		print('Impossible')
	else:
		print('0 0')
else:
	mi = 0
	if n >= m:
		mi = n
	else:
		mi = n + (m - n)
	ma = 0
	if m == 0:
		ma = n
	else:
		ma = n + m - 1
	print(mi, ma)


(grown_ups, children) = map(int, input().split())
if grown_ups < 1 and children:
	print('Impossible')
	exit()
print(max(grown_ups, children), grown_ups + max(children - 1, 0))


import sys
(Parent, Childs) = map(int, input().split())
if Parent < 1 and Childs > 0:
	print('Impossible')
	sys.exit()
min = Parent
if Childs - Parent > 0:
	min += Childs - Parent
max = Parent
if Childs > 0:
	max += Childs - 1
print(min, max)


(a, b) = map(int, input().split())
if a == 0 == b:
	print(0, 0)
elif a == 0:
	print('Impossible')
else:
	if b > a:
		min1 = b
		max1 = a + b - 1
	elif b == 0:
		max1 = min1 = a
	else:
		min1 = a
		max1 = a + b - 1
	print(min1, max1)


def main():
	(n, m) = map(int, input().split())
	if n:
		print(n + max(m - n, 0), n + max(m - 1, 0))
	else:
		print('Impossible' if m else '0 0')
main()


(n, m) = (int(x) for x in input().split())
if n == 0:
	if m == 0:
		print(0, 0)
	else:
		print('Impossible')
else:
	print(n + max(0, m - n), n + max(0, m - 1))


number_of_testcases = 1
for _ in range(number_of_testcases):
	(num_grownups_in_bus, num_childrens_in_bus) = map(int, input().split())
	if num_grownups_in_bus == 0 and num_childrens_in_bus != 0:
		print('Impossible')
	elif num_grownups_in_bus == 0 and num_childrens_in_bus == 0:
		print(0, 0)
	elif num_grownups_in_bus != 0 and num_childrens_in_bus == 0:
		print(num_grownups_in_bus, num_grownups_in_bus)
	else:
		if num_grownups_in_bus == num_childrens_in_bus:
			min_bus_fare = num_grownups_in_bus
			max_bus_fare = 2 * num_grownups_in_bus - 1
		elif num_grownups_in_bus < num_childrens_in_bus:
			min_bus_fare = num_childrens_in_bus
			max_bus_fare = num_grownups_in_bus + num_childrens_in_bus - 1
		else:
			min_bus_fare = num_grownups_in_bus
			max_bus_fare = num_grownups_in_bus + num_childrens_in_bus - 1
		print(min_bus_fare, max_bus_fare)


t = list(map(int, input().split()))
if t[1] != 0:
	if t[0] == 0:
		print('Impossible')
	else:
		c = t[1] // t[0]
		if c == 0:
			print(t[0], end=' ')
		else:
			print(t[0] * c + t[1] % t[0], end=' ')
		print(t[0] + t[1] - 1)
else:
	print(t[0], t[0])


a = input()
b1 = ''
b2 = ''
p1 = 1
p2 = 0
for k in a:
	if k != ' ' and p1:
		b1 += k
	elif k != ' ' and p2:
		b2 += k
	elif k == ' ':
		if p1:
			p1 = 0
			p2 = 1
		elif p2:
			p2 = 0
deti = int(b2)
vzrosl = int(b1)
deneg = 0
if not vzrosl and deti:
	print('Impossible')
elif deti >= vzrosl and deti:
	print(deti, ' ', vzrosl + deti - 1)
elif deti > 0:
	print(vzrosl, ' ', vzrosl + deti - 1)
else:
	print(vzrosl, ' ', vzrosl)


import math
x = [int(p) for p in input().split()]
ng = x[0]
nc = x[1]
if ng == 0 and nc != 0:
	print('Impossible')
elif nc >= ng and ng != 0:
	maxruble = ng + nc - 1
	minruble = ng + int(math.fabs(ng - nc))
	print(minruble, maxruble)
elif nc != 0 and ng != 0 and (nc < ng):
	maxruble = ng + nc - 1
	minruble = ng
	print(minruble, maxruble)
elif nc == 0 and ng != 0:
	maxruble = minruble = ng
	print(maxruble, minruble)
elif nc == 0 and ng == 0:
	print(0, 0)


(g, c) = map(int, input().split(' '))
if c == 0:
	print(g, g)
elif g == 0:
	print('Impossible')
elif g >= c:
	print(g, g + c - 1)
elif g < c:
	print(c, g + c - 1)


(a, b) = map(int, input().split())
if not a:
	if not b:
		print(0, 0)
	else:
		print('Impossible')
else:
	if a >= b:
		t = a
	else:
		t = b
	print(t, a + b - bool(b))


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def f():
	sys.stdout.flush()

def solve():
	(n, m) = mi()
	if m == 0:
		print(n, n)
		exit(0)
	if n == 0:
		print('Impossible')
		exit(0)
	x = m // n
	m1 = m % n
	if x == 0:
		m1 = n
	print(x * n + m1, m + (n - 1))
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


(a, b) = map(int, input().split())
if a < 1 and b > 0:
	print('Impossible')
	import sys
	sys.exit()
c = a + b - 1 if b != 0 else a
print(max(a, b), c)


a = input()
a = a.split()
a[0] = int(a[0])
a[1] = int(a[1])
if a[0] == 0 and a[1] != 0:
	print('Impossible')
else:
	n = a[1] - a[0]
	if n < 0:
		n = 0
	menor = a[0] + n
	m = a[1] - 1
	if m < 0:
		m = 0
	mayor = a[0] + m
	print(menor, mayor)


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from itertools import combinations, permutations
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
(n, k) = r()
b = n + max(0, k - 1)
a = n + max(k - n, 0)
if n == 0:
	if k == 0:
		print(0, 0)
	else:
		print('Impossible')
else:
	print(a, b)


def buses(n, m):
	if n == 0 and m != 0:
		return ('Impossible',)
	if m == 0:
		return (n, n)
	return (max(n, m), m - 1 + n)
(N, M) = [int(i) for i in input().split()]
print(*buses(N, M))


def main():
	mode = 'filee'
	if mode == 'file':
		f = open('test.txt', 'r')
	get = lambda : [int(x) for x in (f.readline() if mode == 'file' else input()).split()]
	[n, m] = get()
	if n == 0 and m > 0:
		print('Impossible')
		return
	print(n + max(0, m - n), n + max(0, m - 1))
	if mode == 'file':
		f.close()
main()


(n, m) = map(int, input().split())
if n == 0 and m > 0:
	print('Impossible')
elif n == 0 and m == 0:
	print(0, 0)
elif m == 0:
	print(n, n)
else:
	x = n
	y = m
	count = 0
	while x > 0 and y > 0:
		x -= 1
		y -= 1
		count += 1
	if x > 0:
		count += x
	if y > 0:
		count += y
	mini = count
	count = 0
	count += n + m - 1
	maxi = count
	print(mini, maxi)


(a, b) = [int(a) for a in input().split()]
if a < 1 and b:
	print('Impossible')
	exit()
print(max(a, b), a + max(b - 1, 0))


import sys
import math
from heapq import *
input = sys.stdin.readline
from functools import cmp_to_key

def pi():
	return int(input())

def pl():
	return int(input(), 16)

def ti():
	return list(map(int, input().split()))

def ts():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
mod = 1000000007
f = []

def fact(n, m):
	global f
	f = [1 for i in range(n + 1)]
	f[0] = 1
	for i in range(1, n + 1):
		f[i] = f[i - 1] * i % m

def fast_mod_exp(a, b, m):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b = b >> 1
	return res

def inverseMod(n, m):
	return fast_mod_exp(n, m - 2, m)

def ncr(n, r, m):
	if n < 0 or r < 0 or r > n:
		return 0
	if r == 0:
		return 1
	return f[n] * inverseMod(f[n - r], m) % m * inverseMod(f[r], m) % m

def main():
	A()

def A():
	[n, m] = ti()
	if n == 0 and m != 0:
		print('Impossible')
		return
	if m == 0:
		print(n, n)
		return
	(mx, mn) = (0, 0)
	if n > m:
		mn = n
		mx = n + m - 1
	if n == m:
		mx = n + m - 1
		mn = n
	if n < m:
		mx = n + m - 1
		mn = n + (m - n)
	print(mn, mx)
main()


import math
import queue
(n, m) = map(int, input().split())
if n == 0:
	if m > 0:
		print('Impossible')
	else:
		print('0 0')
elif m == 0:
	print(n, ' ', n)
else:
	a = max(n, m)
	b = n + m - 1
	print(a, ' ', b)


(n, m) = map(int, input().split())
min_answer = n + max(m - n, 0)
max_answer = n + max(0, m - 1)
if n == 0 and m == 0:
	print('0 0')
	exit(0)
if n == 0:
	print('Impossible')
	exit(0)
print(min_answer, max_answer)


(n, m) = map(int, input().split())
print(*[[max(m, n), [n, m + n - 1][m > 0]], ['Impossible']][n == 0 and m > 0])


(n, m) = map(int, input().split())
s = 0
t = 0
if n == 0 and m != 0:
	print('Impossible')
elif m == 0:
	print(n, end=' ')
	print(n)
elif n >= m:
	s = n
	t = n + m - 1
	print(s, end=' ')
	print(t)
elif m // n == 1:
	print(n + m % n, end=' ')
	print(n + m - 1)
else:
	print(n * (m // n) + m % n, end=' ')
	print(n + m - 1)


(n, m) = map(int, input().split())
mi = n + max(m - n, 0)
ma = n + max(0, m - 1)
if n == 0 and m == 0:
	print('0 0')
	exit(0)
if n == 0:
	print('Impossible')
	exit(0)
print(mi, ma)


import math
(n, m) = map(int, input().split())
c = 0
if n == 0 and m > n:
	print('Impossible')
elif m == 0:
	print(n, n)
elif n == 1:
	c = c + n + (m - 1)
	print(c, c)
elif m <= n:
	print(n, n + m - 1)
elif m > n:
	print(m, m + n - 1)


(n, m) = [int(i) for i in input().split()]
if n:
	print(n + m - min(m, n), n + m - min(m, 1))
elif n <= 0 and m > 0:
	print('Impossible')
elif n == 0 and m == 0:
	print(0, 0)


def f(l):
	(n, m) = l
	if n == 0:
		return ['Impossible'] if m > 0 else [0, 0]
	return [max(m, n), n + m - 1 if m > 0 else n + m]
l = list(map(int, input().split()))
print(*f(l))


(n, m) = map(int, input().split())
if n == 0 and m > 0:
	print('Impossible')
	exit()
if n == 0 and m == 0:
	print(0, 0)
	exit()
cpa = int(m / n)
r = m % n
if cpa == 0:
	min_money = n
else:
	min_money = (cpa - 1) * n + r + n
max_money = max(n + m - 1, n)
print(min_money, max_money)


(a, b) = map(int, input().split(' '))
if b == 0:
	print(a, a)
elif a == 0:
	print('Impossible')
elif a >= b:
	print(a, a + b - 1)
elif b > a:
	print(b, a + b - 1)


(a, b) = map(int, input().split())
if a < 1 and b:
	print('Impossible')
	exit()
print(max(a, b), a + max(b - 1, 0))


(n, m) = map(int, input().split())
if n == 0 and m > 0:
	print('Impossible')
else:
	max_rev = n + max(m - 1, 0)
	min_rev = n + max(m - n, 0)
	print(min_rev, max_rev)


def main():
	(n, m) = map(int, input().split())
	if n == m == 0:
		print(0, 0)
	elif n == 0:
		print('Impossible')
	elif m == 0:
		print(n, n)
	else:
		if n >= m:
			min_ = n
		else:
			min_ = n + (m - n)
		max_ = n + (m - 1)
		print(min_, max_)
main()


(n, k) = map(int, input().split())
if n == 0 and k != 0:
	print('Impossible')
else:
	print([n, k][k > n], end=' ')
	print([n, n + k - 1][k != 0])


params = list(map(int, input().split()))
(a, c) = (params[0], params[1])
if a == 0:
	if c > 0:
		print('Impossible')
	else:
		print('0 0')
else:
	min_pay = max(a, c)
	if c == 0:
		max_pay = a
	else:
		max_pay = a + c - 1
	print(str(min_pay) + ' ' + str(max_pay))


(n, m) = map(int, input().strip().split())
if m == 0:
	print(n, n)
elif n == 0:
	print('Impossible')
else:
	print(n + max((0, m - n)), end=' ')
	print(n + m - 1)


(n, m) = [int(x) for x in input().split()]
if n == 0 and m == 0:
	print(0, 0)
elif n == 0:
	print('Impossible')
elif m == 0:
	print(n, n)
elif n >= m:
	print(n, n + m - 1)
else:
	print(n * (m // n) + m % n, m + n - 1)


(n, m) = map(int, input().split())
if n == 0 and m:
	print('Impossible')
elif n == m and (not n):
	print(0, 0)
elif m == 0 and n:
	print(n, n)
else:
	x = m + n - 1
	y = n * (m // n) + m % n
	if not m // n:
		y = n
	print(y, x)


arr = list(map(int, input().split()))
n = arr[0]
m = arr[1]
if n == 0 and m > 0:
	print('Impossible')
else:
	a = max(m, n)
	b = m + n - 1
	if m == 0:
		b = n
		a = n
	print(str(a) + ' ' + str(b))


(n, m) = map(int, input().split())
if n == 0 and m != 0:
	print('Impossible')
else:
	mini = n + max(0, m - n)
	maxi = n + m - (1 if m > 0 else 0)
	print(mini, maxi)


(n, m) = map(int, input().split())
print(*[[n + m - min(m, n), [n, m + n - 1][m > 0]], ['Impossible']][n == 0 and m > 0])


from sys import stdin
gente = [int(x) for x in stdin.readline().split()]
if gente[0] == 0 and gente[1] > 0:
	print('Impossible')
elif gente[1] == 0:
	print(gente[0], gente[0])
elif gente[0] == gente[1]:
	print(gente[0], gente[0] + gente[1] - 1)
elif gente[0] > gente[1]:
	if gente[1] == 1:
		print(gente[0], gente[0])
	else:
		print(gente[0], gente[0] - 1 + gente[1])
elif gente[0] < gente[1]:
	print(gente[1], gente[1] + gente[0] - 1)


(n, k) = map(int, input().split())
p = 0
l = 0
if n == 0 and k == 0:
	print('0 0')
elif n == 0:
	print('Impossible')
elif k == 0:
	print(n, ' ', n)
else:
	if n > k:
		print(n)
	else:
		m = k - n
		print(m + n)
	l = n + k - 1
	print(l)


(x, y) = map(int, input().split())
if x == y and x == 0:
	print('0 0\n')
	exit(0)
if x == 0:
	print('Impossible\n')
	exit(0)
elif y == 0:
	print(x, x)
	exit(0)
elif x == 1:
	print(y, y, '\n')
	exit(0)
if y == 1:
	print(x, x)
	exit(0)
z = y - int(y / x) * x
a = int(y / x) * x
if a == 0:
	a += x - z
print(a + z, y + x - 1, '\n')


(grown_ups, children) = map(int, input().split())
if grown_ups < 1 and children > 0:
	print('Impossible')
	import sys
	sys.exit()
Max = grown_ups + children - 1 if children != 0 else grown_ups
print(max(grown_ups, children), Max)


from sys import stdin

def main():
	a = stdin.readline().split()
	b = int(a[0])
	c = int(a[1])
	min = 0
	max = 0
	f = []
	if b == 0 and c == 0:
		min = 0
		max = 0
		f.append(str(min))
		f.append(str(max))
		d = ' '.join(f)
		print(d)
	elif b == 0 and c > 0:
		print('Impossible')
	elif b > 0 and c == 0:
		min = b
		max = b
		f.append(str(min))
		f.append(str(max))
		d = ' '.join(f)
		print(d)
	elif c >= b:
		min = b + (c - b)
		max = b + (c - 1)
		f.append(str(min))
		f.append(str(max))
		d = ' '.join(f)
		print(d)
	elif c < b:
		min = b
		max = b + (c - 1)
		f.append(str(min))
		f.append(str(max))
		d = ' '.join(f)
		print(d)
main()


(a, c) = map(int, input().split())
if a == 0 and c == 0:
	print(0, 0)
elif a == 0:
	print('Impossible')
elif c == 0:
	p_min = a
	p_max = a
	print(p_min, p_max)
elif a == c:
	p_min = a
	p_max = a + c - 1
	print(p_min, p_max)
elif a > c:
	p_min = a
	p_max = a + c - 1
	print(p_min, p_max)
elif a < c:
	p_min = c
	p_max = a + c - 1
	print(p_min, p_max)


(a, b) = map(int, input().split(' '))
if a == 0 and b == 0:
	print(0, 0)
	quit()
if a <= b:
	if a == 0:
		print('Impossible')
	else:
		print(b, a - 1 + b)
else:
	if b == 0:
		print(a, a)
		quit()
	print(a, a - 1 + b)


def solve(grownups, children):
	if grownups == 0 and children == 0:
		return [0, 0]
	if grownups == 0:
		return []
	if children == 0:
		return [grownups, grownups]
	most = children + grownups - 1
	least = grownups + max(0, children - grownups)
	return [least, most]
(n, m) = [int(s) for s in input().split()]
ans = solve(n, m)
if ans:
	print(ans[0], ans[1])
else:
	print('Impossible')


(n, m) = map(int, input().split())
if not n and m:
	print('Impossible')
else:
	print(n + m - min(m, n), m + n - 1 if m else n)


import os
import sys
from io import BytesIO, IOBase
mod = 10 ** 9 + 7

def main():
	(n, m) = map(int, input().split())
	if n == 0 and m != 0:
		print('Impossible')
		exit()
	if n >= m:
		print(n, n + max(0, m - 1))
		exit()
	print(n * (m // n) + m % n, n + m - 1)

def nouse0():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse1():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse2():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def nouse3():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse4():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse5():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
main()


import sys
import math
(n, m) = [int(x) for x in sys.stdin.readline().split()]
if n == 0 and m == 0:
	print('0 0')
elif n == 0:
	print('Impossible')
elif m == 0:
	print(str(n) + ' ' + str(n))
else:
	vmax = n + (m - 1)
	if n >= m:
		vmin = n
	else:
		vmin = n + m - n
	print(str(vmin) + ' ' + str(vmax))


(n, m) = list(map(int, input().split()))
if n == 0 and m != 0:
	print('Impossible')
else:
	print(f'{n + (m - n if m > n else 0)} {n + (m - 1 if m > 0 else 0)}')


_ = [0, 0]
_Point = 1
a = list(map(int, input().split()))
if a[1] == 0:
	_Point = 0
if a[0] == 0 and a[1] > 0:
	print('Impossible')
else:
	_[1] = a[0] + a[1] - _Point
	if a[0] < a[1]:
		_[0] = a[0] + abs(a[0] - a[1])
	else:
		_[0] = a[0]
	print(*_, sep=' ')


(n, m) = map(int, input().split())
if n == 0 and m > 0:
	print('Impossible')
elif n >= m:
	if m > 0:
		print(n, n + m - 1)
	else:
		print(n, n + m)
else:
	m1 = m - n
	mini = n + m1
	maxi = n + m
	if m > 0:
		print(mini, maxi - 1)
	else:
		print(mini, maxi)


(n, m) = [int(i) for i in input().split()]
if n == 0 and m > 0:
	print('Impossible')
else:
	e = m - 1
	if e <= 0:
		e = 0
	max = n + e
	if m <= n:
		min = n
	else:
		min = n + (m - n)
	print(min, max)


while 1:
	try:
		(n, m) = map(int, input().split())
		(maxi, mini) = (0, 0)
		if n == 0 and m != 0:
			print('Impossible')
		elif n == 0 and m == 0:
			print(mini, maxi)
		elif m == 0:
			(maxi, mini) = (n, n)
			print(mini, maxi)
		else:
			maxi = n + m - 1
			if n <= m:
				mini = m
			else:
				mini = n
			print(mini, maxi)
	except EOFError:
		break