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.

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.

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).

NoteIn 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.

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int n, m;
		n = cin.nextInt();
		m = cin.nextInt();
		if(n == 0){
			if(m==0)
				System.out.println("0 0");
			else
				System.out.println("Impossible");
		} else {
			if(m==0)
				System.out.println(String.format("%d %d", n,n));
			else
				System.out.println(String.format("%d %d", n+m-Math.min(n, m),n+m-1));
		}

	}

}

import java.io.FileInputStream;
import java.util.Scanner;

public class Problem190A {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(
                System.in
                //new FileInputStream("190A1.txt")
                );
        int ad = sc.nextInt();
        int ch = sc.nextInt();
        if (ad == 0 && ch == 0){
            System.out.println("0 0");
            return;
        }
        if (ad <= 0){
            System.out.println("Impossible");
            return;
        }
        System.out.println(
                ((ad + ch) - Math.min(ad, ch))
                + " "
                + ((ad + ch) - Math.min(1, ch)) );

    }

}

import java.util.Scanner;public class a{public static void main(String args[]){Scanner z=new Scanner(System.in);int a=z.nextInt();int b=z.nextInt();if(a<1&b>0){System.out.print("Impossible");return;}System.out.printf("%s %s",Math.max(a,b),b!=0?a+b-1:a);}}

import java.util.Random;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.File;
import java.math.BigInteger;

public class Task{

	static final boolean readFromFile = false;
	static final String fileInputName = "input.txt",
						fileOutputName = "output.txt";

	public static void main(String args[]){
		FileInputStream fileInputStream;
		FileOutputStream fileOutputStream;
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		if (readFromFile){
			try{
				fileInputStream = new FileInputStream(new File(fileInputName));
				fileOutputStream = new FileOutputStream(new File(fileOutputName));
			}catch (FileNotFoundException e){
				throw new RuntimeException(e);
			}
		}
		PrintWriter out = new PrintWriter((readFromFile)?fileOutputStream:outputStream);
		InputReader in  = new InputReader((readFromFile)?fileInputStream:inputStream);

		Solver s = new Solver(in, out);
		s.solve();

		out.close();
	}
}

class Solver{
	private PrintWriter out;
	private InputReader in;

	public void solve(){
		int n = in.nextInt(),
				m = in.nextInt();
		if (n==0 && m!=0)
			out.println("Impossible");
		else{
			int t = Math.min(n,m),
				min = n+m-t,
				max = n+m-1;
			if (m==0)
				max++;
			out.println(min + " " + max);
		}
	}

	Solver(InputReader in, PrintWriter out){
		this.in = in;
		this.out = out;
	}
}

class InputReader{
	StringTokenizer tok;
	BufferedReader buf;

	InputReader(InputStream in){
		tok = null;
		buf = new BufferedReader(new InputStreamReader(in));
	}

	InputReader(FileInputStream in){
		tok = null;
		buf = new BufferedReader(new InputStreamReader(in));
	}

	public String next(){
		while (tok==null || !tok.hasMoreTokens()){
			try{
				tok = new StringTokenizer(buf.readLine()," -:");
			}catch (IOException e){
				throw new RuntimeException(e);
			}
		}
		return tok.nextToken();
	}

	public int nextInt(){
		return Integer.parseInt(next());
	}
	public long nextLong(){
		return Long.parseLong(next());
	}
	public double nextDouble(){
		return Double.parseDouble(next());
	}
	public float nextFloat(){
		return Float.parseFloat(next());
	}
	public String nextLine(){
		try{
			return buf.readLine();
		}catch (IOException e){
			throw new RuntimeException(e);
		}
	}
}

import java.util.*;
import java.io.*;

public class Main {
	FastScanner in;
	PrintWriter out;

	public void solve() throws IOException {
		int n, m;
		n = in.nextInt();
		m = in.nextInt();
		if (n + m == 0) System.out.println("0 0");
		else if (n == 0) System.out.println("Impossible");
		else {
			System.out.print(n + Math.max(0,  m - n));
			System.out.print(' ');
			if (m == 0) System.out.print(n);
			else System.out.println(n + m - 1);
		}
	}

	public void run() {
		try {
			in = new FastScanner(new File("a.in"));
			out = new PrintWriter(System.out);
			//out = new PrintWriter(new File("a.out"));

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
				br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] arg) {
		new Main().run();
	}
}

import static java.lang.Math.*;

import java.io.*;

public class A {

	final int MOD = 1000000007;
	final double eps = 1e-12;

	public  A () throws IOException {
		int N = sc.nextInt();
		int M = sc.nextInt();

		if (N == 0 && M > 0)
			exit("Impossible");

		if (M == 0 && N == 0)
			exit(0, 0);

		int min = max(M, N);
		int max = max(N+M-1, N);

		exit(min, max);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;
	static PrintWriter pw = new PrintWriter(System.out);

	static void print (Object... a) {
		StringBuffer b = new StringBuffer();
		for (Object o : a)
			b.append(" ").append(o);
		pw.println(b.toString().trim());
	}

	static void exit (Object... a) {
		print(a);
		exit();
	}

	static void exit () {
		pw.flush();
//		System.err.println("------------------");
//		System.err.println("Time: " + (millis() - t) / 1000.0);
		System.exit(0);
	}

	static class MyScanner {
		String next() throws IOException {
			newLine();
			return line[index++];
		}

		char nextChar() throws IOException {
			return next().charAt(0);
		}

		double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		String nextLine() throws IOException {
			line = null;
			return r.readLine();
		}

		String [] nextStrings() throws IOException {
			line = null;
			return r.readLine().split(" ");
		}

		char [] nextChars() throws IOException {
			return next().toCharArray();
		}

		int [] nextInts() throws IOException {
			String [] L = nextStrings();
			int [] res = new int [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		long [] nextLongs() throws IOException {
			String [] L = nextStrings();
			long [] res = new long [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		boolean eol() {
			return index == line.length;
		}

		//////////////////////////////////////////////

		private final BufferedReader r;

		MyScanner () throws IOException {
			this(new BufferedReader(new InputStreamReader(System.in)));
		}

		MyScanner(BufferedReader r) throws IOException {
			this.r = r;
		}

		private String [] line;
		private int index;

		private void newLine() throws IOException {
			if (line == null || eol()) {
				line = r.readLine().split(" ");
				index = 0;
			}
		}
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) throws IOException {
		run();
		exit();
	}

	static void start() {
		t = millis();
	}

	static void run () throws IOException {
		sc = new MyScanner ();
		new A();
	}

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)throws Exception {
        File _=new File("bus.in");
        BufferedReader br=_.exists()? new BufferedReader(new FileReader(_)) : new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st= new StringTokenizer(br.readLine());
        int grown, kids;
        grown=Integer.parseInt(st.nextToken());
        kids=Integer.parseInt(st.nextToken());

        int max,min;
        if(grown==0 && kids>0){
            System.out.println("Impossible");
        }
        else if(kids==0){
            max=min=grown;
            System.out.println(min+" "+max);
        }
        else if(kids>grown){
            max=grown+kids-1;
            min=kids;
            System.out.println(min+" "+max);
        }
        else{
            max=grown+kids-1;
            min=grown;
            System.out.println(min+" "+max);
        }

    }
}

// created by: 17.04.12 10:13 programmer: thinker

import java.io.BufferedInputStream;
import java.util.Scanner;

public class A
{
    public A()
    {
        Scanner sc = new Scanner(new BufferedInputStream(System.in));
        long n = sc.nextLong(), m = sc.nextLong();
        if(n == 0 && m != 0)
        {
            System.out.println("Impossible");
            return;
        }
        if(m == 0)
            System.out.println((n)+" "+(n));
        else if(m > n)
            System.out.println((n+(m-n))+" "+(n+(m-1)));
        else
            System.out.println((n)+" "+(n+(m-1)));
    }

    public static void main(String[] args)
    {
        new A();
    }
}

import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import static java.lang.System.*;
import java.math.BigInteger;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;

public class busandfare {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static Scanner sc = new Scanner(System.in);

    public static String getString() {
        try {
            return br.readLine();
        } catch (Exception e) {
        }
        return "";
    }

    public static Integer getInt() {
        try {
            return Integer.parseInt(br.readLine());
        } catch (Exception e) {
        }
        return 0;
    }

    public static Integer[] getIntArr() {
        try {
            String temp[] = br.readLine().split(" ");
            Integer temp2[] = new Integer[temp.length];
            for (int i = 0; i < temp.length; i++) {
                temp2[i] = Integer.parseInt(temp[i]);
            }
            return temp2;
        } catch (Exception e) {
        }
        return null;
    }

    public static int getMax(Integer[] ar) {
        int t = ar[0];
        for (int i = 0; i < ar.length; i++) {
            if (ar[i] > t) {
                t = ar[i];
            }
        }
        return t;
    }

    public static void printList(List<Integer> a) {
        System.out.println(a.toString().replace("[", "").replace("]", "").replace(",", ""));
    }

    public static void print(Object a) {
        out.println(a);
    }

    public static int nextInt() {
        return sc.nextInt();
    }

    public static double nextDouble() {
        return sc.nextDouble();
    }

    public static BigInteger getFact(long in) {
        BigInteger ot = new BigInteger("1");
        for (Integer i = 1; i <= in; i++) {
            ot = ot.multiply(new BigInteger(i.toString()));
        }
        return ot;
    }

    public static String gbase(int a, int base) {
        String out = "";
        int temp = a;
        while (temp > 0) {
            out = temp % base + out;
            temp /= base;
        }
        return out;
    }

    public static void main(String[] ar) {
        Integer[] inp = getIntArr();
        int min = 0;
        int max = 0;

        if (inp[0] == 0 && inp[1]!=0) {
            print("Impossible");
            return;
        }

        if (inp[1] >= inp[0]) {
            min += inp[1] - inp[0];
            min += inp[0] ;
        } else {
            min += inp[0];
        }
        if (inp[1] > 0) {
            max += inp[1];
            max += inp[0] - 1;
        }

        if(inp[1]==0){
            max=inp[0];
            min=max;
        }
        print(min + " " + max);
    }
}

import java.io.*;
import java.util.*;

public class TaskA {
	BufferedReader br;
	PrintWriter out;
	StringTokenizer stok;

	void solve() throws IOException {
		int n = nextInt(), m = nextInt();
		int min = n;
		if (m > n) {
			min += (m - n);
		}
		if (n == 0 && m == 0) {
			out.println("0 0");
			return;
		}
		if (m == 0) {
			out.println(n + " " + n);
			return;
		}
		if (n == 0) {
			out.println("Impossible");
			return;
		}

		out.println((min) + " " + (n + m - 1));
	}

	String nextToken() throws IOException {
		while (stok == null || !stok.hasMoreTokens()) {
			String s = br.readLine();
			if (s == null) {
				return null;
			}
			stok = new StringTokenizer(s);
		}
		return stok.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	char nextChar() throws IOException {
		return (char) (br.read());
	}

	String nextLine() throws IOException {
		return br.readLine();
	}

	void run() throws IOException {
		// br = new BufferedReader(new FileReader("cf.in"));
		// out = new PrintWriter("cf.out");
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		br.close();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		// Locale.setDefault(Locale.US);
		new TaskA().run();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String a[] = in.readLine().split(" ");
        int adultos = Integer.valueOf(a[0]), ninno = Integer.valueOf(a[1]);
        if (adultos > 0 || ninno==0) {
            System.out.print((ninno > adultos ? ninno : adultos) + " ");
            System.out.println(ninno > 0 ? adultos + ninno - 1 : adultos);
        } else {
            System.out.println("Impossible");
        }
    }
}

//package fuckyeah;

import java.util.Scanner;

public class FuckYeah {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int pares = Math.min(n, m);
        if (n == 0) {
            if (m == 0) {
                System.out.println(0 + " " + 0);
            } else {
                System.out.println("Impossible");
            }
        } else {
            int min = m + n - pares;
            int max = m + n - 1;
            if (m == 0) {
                max++;
            }
            System.out.println(min + " " + max);
        }
    }
}

import java.util.Scanner;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        if (n==0) {
            if (m != 0)
                System.out.println("Impossible");
            else
                System.out.println(0+" "+0);
            return;
        }
        int min = n+m, max = n+m;
        if (m > n)
            min -= n;
        else
            min -= m;
        if (m > 0)
            max--;
        System.out.println(min+" "+max);
    }

}

import java.util.Scanner;

public class A {

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0 && m>0) {
            System.out.println("Impossible");
        } else {
            int max = n + Math.max(0, m - 1);
            int min = n + Math.max(0, m - n);
            System.out.println(min + " " + max);
        }
    }
}

import java.io.*;
import java.util.*;

@SuppressWarnings("unused")
public class A {
	public  static  FastScannerA scan = new FastScannerA();
	public static PrintWriter out = new PrintWriter(System.out);
	static long mad=(long) Math.pow(10, 9)+7;
	static boolean isPrime(int x) {
		if(x==1) return false;
		for(int i=2;i*i<=x;i++) {
			if(x%i==0) {
				return false;
			}
		}
		return true;
	}

	public static void solve () {
		int n=scan.nextInt(), m=scan.nextInt();
		if(n==0) {
			if(m==0) out.println("0 0");
			else System.out.println("Impossible");
		}
		else {
			if(m==0) {
				out.println(n+" "+n);
			}
			else {
				int min=n+m-1;
				int max=n+m-Math.min(n, m);
				out.println(max+" "+min);
			}
		}
	}
	public static void main(String[] args) {

		solve();
		out.close();
	}

}
class FastScannerA {
	BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st= new StringTokenizer("");
	String next() {
		while (!st.hasMoreTokens())
			try {
				st=new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		return st.nextToken();
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	int[] readArray(int n) {
		int[] a=new int[n];
		for (int i=0; i<n; i++) a[i]=nextInt();
		return a;
	}
	long nextLong() {
		return Long.parseLong(next());
	}
	void sort(long[] a) {
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

}

import java.io.DataInputStream;
	import java.io.FileInputStream;
	import java.io.FileNotFoundException;
	import java.io.FileOutputStream;
	import java.io.IOException;
	import java.io.InputStream;
	import java.io.InputStreamReader;
	import java.io.PrintWriter;
	import java.math.BigInteger;
	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.InputMismatchException;
	import java.util.Iterator;
	import java.util.LinkedList;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Random;
	import java.util.Scanner;
	import java.util.Stack;
	import java.util.StringTokenizer;
	import java.util.TreeMap;
	import java.util.TreeSet;

	import java.util.BitSet;

	public class Main {
		private static InputStream stream;
		private static byte[] buf = new byte[1024];
		private static int curChar;
		private static int numChars;
		private static SpaceCharFilter filter;
		private static PrintWriter pw;
		private static long mod = 1000000000 + 7;
		private static int MAX=1000001;
		private static int block;
		private static void soln(){
			int n=nextInt();
			int m=nextInt();
			int min=n+m-1;
			if(m==0)
				min++;
			int max=m+Math.max(n-m,0);
			if(n==0 && m!=0)
				pw.println("Impossible");
			else
				pw.println(max+" "+min);
		}
		public static long bfs(LinkedList<Pair1>[] list,int cur,long cost,int x){
			if(cur==x+1)
				return cost;
			if(cur>x+1)
				return Long.MAX_VALUE;
			long temp=Long.MAX_VALUE;
			System.out.println(cur);
			for(Pair1 p:list[cur]){
				int r=p.i;
				long c=p.li;
				temp=Math.min(temp,bfs(list,r+1,cost+c,x));
			}
			return temp;
		}
		private static class Pair1 {
			int i;
			long li;
			public Pair1(int a,long b){
				i=a;li=i+b;
			}
		}
		private static int[] buildSuffix(String s,int n){
			Integer[] order=new Integer[n];
			for(int i=0;i<n;i++) order[i]=n-i-1;
			Arrays.sort(order,(a,b) -> Character.compare(s.charAt(a),s.charAt(b)));
			int[] sa=new int[n];
			int[] m_tmp=new int[n];
			for(int i=0;i<n;i++){
				sa[i]=order[i];
				m_tmp[i]=s.charAt(i);
			}
			for(int len=1;len<n;len<<=1){
				int[] tmp=m_tmp.clone();
				m_tmp[sa[0]]=0;
				for(int i=1;i<n;i++){
					m_tmp[sa[i]] = (tmp[sa[i-1]]==tmp[sa[i]] && tmp[(sa[i-1]+len>>1)%n]==tmp[(sa[i]+len>>1)%n]) ? m_tmp[sa[i-1]]:i;
				}
				int[] cnt=new int[n];
				for(int i=0;i<n;i++) cnt[i]=i;
				int[] sa_tmp=sa.clone();
				for(int i=0;i<n;i++){
					int s1=(sa_tmp[i]-len+n)%n;
					sa[cnt[m_tmp[s1]]++]=s1;
				}
			}
			return sa;
		}
		private static int[] buildLCP(int[] sa,String s,int n){
			int[] ind=new int[n];
			for(int i=0;i<n;i++)
				ind[sa[i]]=i;
			int[] lcp=new int[n];
			for(int i=0, k=0; i<n; i++)
				if(ind[i] < n-1){
					for(int j=sa[ind[i]+1]; Math.max(i,j)+k < n && s.charAt(i+k)==s.charAt(j+k);) k++;
					lcp[ind[i]]=k;
					if(k>0) k--;
				}
			return lcp;
		}
		private static int[] buildLCP1(int[] sa,String s,int n){
			int[] ind=new int[n+1];
			for(int i=1;i<=n;i++)
				ind[sa[i]]=i;
			int[] lcp=new int[n+1];
			for(int i=1, k=0; i<=n; i++)
				if(ind[i] < n){
					for(int j=sa[ind[i]+1]; Math.max(i,j)+k <= n && s.charAt(i+k-1)==s.charAt(j+k-1);) k++;
					lcp[ind[i]]=k;
					if(k>0) k--;
				}
			return lcp;
		}
		static class Pair implements Comparable<Pair>{
			int i;
			int j;
			int ind;
			public Pair(int a,int b,int c){
				i=a;
				j=b;
				ind=c;
			}
			@Override
			public int compareTo(Pair arg0) {
				return this.i-arg0.i;
			}
		}
		public static class Segment {
		    private int[][] tree;
		    //private int[] cnt2;
		    private int size;
		    private int n;
		    private class node{
		        private int a;
		        private int b;
		        private int c;
		        public node(int x,int y,int z){
		            a=x;
		            b=y;
		            c=z;
		        }
		    }
		    public Segment(int n){
		        //this.base=arr;
		        int x = (int) (Math.ceil(Math.log(n) / Math.log(2)));
		        size = 2 * (int) Math.pow(2, x) - 1;
		        tree=new int[size][2];
		        //cnt2=new int[size];
		        this.n=n;
		        //build(0,0,n-1);
		    }
		    /*private void build(int id,int l,int r){
		        //pw.println(1);
		        if(r==l){
		            tree[id]=1;
		            return;
		        }
		        int mid=l+(r-l)/2;
		        //System.out.println(2*id+1+" "+l+" "+mid);
		        build(2*id+1,l,mid);
		        //System.out.println(2*id+2+" "+(mid+1)+" "+r);
		        build(2*id+2,mid+1,r);
		        tree[id]=tree[2*id+1]+tree[2*id+2];
		    }*/
		    public String query(int j,int i){
		        return queryUtil(j,i,0,0,n-1);
		    }
		    private String queryUtil(int j,int i,int id,int l,int r){
		        int mid=l+(r-l)/2;
		        if(l==r){
		        	return l+" "+j;
		        }
		        long val1=((long)tree[(id<<1)|1][0])*((long)i)+(long)tree[2*id+1][1];
		        //System.out.println(val1+" "+j+" "+l+" "+r);
		        if(val1>=j)
		        	return queryUtil(j,i,(id<<1)|1,l,mid);
		        else
		        	return queryUtil(j-(int)val1,i,2*id+2,mid+1,r);
		    }
		    /*private void cnt(int id,int l,int r,HashSet<Integer> set){
		        if(tree[id]!=0){
		            set.add(tree[id]);
		            return;
		        }
		        if(r==l)
		            return;
		        int mid=l+(r-l)/2;
		        cnt(2*id+1,l,mid,set);
		        cnt(2*id+2,mid+1,r,set);
		    }*/
		    public void update(int i,int f,int val){
		    	updateUtil(i,f,val,0,0,n-1);
		    }
		    public void updateUtil(int i,int f,int val,int id,int l,int r){
		        if(l==r){
		        	tree[id][f]=val;
		        	return;
		        }
		        int mid=l+(r-l)/2;
		        //shift(id);
		        if(l<=i && i<=mid)
		        	updateUtil(i,f,val,2*id+1,l,mid);
		        else
		        	updateUtil(i,f,val,2*id+2,mid+1,r);
		        tree[id][f]=tree[2*id+1][f]+tree[2*id+2][f];
		        //tree[id][1]=tree[(id<<1)|1][1]+tree[(id<<1)+2][0];
		    }
		   /* private void shift(int id){
		        if(tree[id]!=0){
		            tree[2*id+1]=tree[2*id+2]=tree[id];
		        }
		        tree[id]=0;
		    }*/
		}
		private static class DSU{
			int[] parent;
			public DSU(int n){
				parent=new int[n];
				for(int i=0;i<n;i++)
					parent[i]=i;
			}
			int find(int i){
		        while(parent[i] !=i){
		        	parent[i]=parent[parent[i]];
		        	i=parent[i];
		        }
		        return i;
		    }
			void Union(int x, int y){
		        int xset = find(x);
		        int yset = find(y);
		        parent[yset]=yset;
		        parent[xset] = yset;
		    }
		}
		public static class Merge {
		    public static void sort(long inputArr[]) {
		        int length = inputArr.length;
		        doMergeSort(inputArr,0, length - 1);
		    }
		    private static void doMergeSort(long[] arr,int lowerIndex, int higherIndex) {
		        if (lowerIndex < higherIndex) {
		            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
		            doMergeSort(arr,lowerIndex, middle);
		            doMergeSort(arr,middle + 1, higherIndex);
		            mergeParts(arr,lowerIndex, middle, higherIndex);
		        }
		    }
		    private static void mergeParts(long[]array,int lowerIndex, int middle, int higherIndex) {
		        long[] temp=new long[higherIndex-lowerIndex+1];
		        for (int i = lowerIndex; i <= higherIndex; i++) {
		            temp[i-lowerIndex] = array[i];
		        }
		        int i = lowerIndex;
		        int j = middle + 1;
		        int k = lowerIndex;
		        while (i <= middle && j <= higherIndex) {
		            if (temp[i-lowerIndex] < temp[j-lowerIndex]) {
		                array[k] = temp[i-lowerIndex];
		                i++;
		            } else {
		                array[k] = temp[j-lowerIndex];
		                j++;
		                //cnt+=(middle+1-i);
		            }
		            k++;
		        }
		        while (i <= middle) {
		            array[k] = temp[i-lowerIndex];
		            k++;
		            i++;
		        }
		        while(j<=higherIndex){
		            array[k]=temp[j-lowerIndex];
		            k++;
		            j++;
		        }
		        /*pw.println(lowerIndex+" "+higherIndex);
		        for(int m=lowerIndex;m<=higherIndex;m++)
		            pw.print(array[m]+" ");
		        pw.println();*/
		    }

		}

		private static class Edge{
			int x;
			int y;
			int i;
			public Edge(int a,int b,int c){
				x=a; y=b;i=c;
			}
		}
		private static long pow(long a, long b, long c) {
			if (b == 0)
				return 1;
			long p = pow(a, b / 2, c);
			p = (p * p) % c;
			return (b % 2 == 0) ? p : (a * p) % c;
		}

		private static class Mo implements Comparable<Mo>{
			int l;
			int r;
			int i;
			int val;
			public Mo(int a,int b,int ind,int d) {
				l=a;r=b;i=ind;val=d;
			}
			@Override
			public int compareTo(Mo arg0) {
				int b1=this.l/block;
				int b2=arg0.l/block;
				return (b1!=b2)?(b1-b2):(this.r-arg0.r);
			}
		}

		private static long gcd(long n, long l) {
			if (l == 0)
				return n;
			return gcd(l, n % l);
		}

		private static long max(long a, long b) {
			if (a > b)
				return a;
			return b;
		}

		private static long min(long a, long b) {
			if (a < b)
				return a;
			return b;
		}

		public static void main(String[] args) throws Exception {
			new Thread(null,new Runnable(){
				@Override
				public void run() {
					/*try {
						InputReader(new FileInputStream("C:\\Users\\hardik\\Desktop\\C-small-1-attempt1.in"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					/*try {
					InputReader(new FileInputStream("/root/codes/in.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					InputReader(System.in);
					pw = new PrintWriter(System.out);
					/*try {
						pw=new PrintWriter(new FileOutputStream("C:\\Users\\hardik\\Desktop\\out.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					/*try {
						pw=new PrintWriter(new FileOutputStream("/root/codes/out.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					soln();
					pw.close();
				}
			},"1",1<<26).start();
		}

		public static void InputReader(InputStream stream1) {
			stream = stream1;
		}

		private static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private static boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		private static int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		private static int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		private static long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		private static String nextToken() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		private static String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		private static int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

		private static long[] nextLongArray(int n) {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}
			return arr;
		}

		private static void pArray(int[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}

		private static void pArray(long[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}

		private static boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}
		private static char nextChar() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			char c1=(char)c;
			while(!isSpaceChar(c))
				c=read();
			return c1;
	}
		private interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

import java.util.*;

//Current File Class
public class HELL
{
    static Scanner cin=new Scanner(System.in);
    public static void main(String[] args)
    {
        int n,m,low=0,high=0;
        n=cin.nextInt();                m=cin.nextInt();
        if(n==0 && m==0)
            System.out.println(0 + " " + 0);
        else if(n==0)
            System.out.println("Impossible");
        else
        {
            int t1=n,t2=m;
            while(t1>0 || t2>0)
            {   ++low;      --t1;       --t2;       }

            if(n>0)
                --n;
            if(m>0)
                --m;
            high=1+m+n;
            System.out.println(low + " " + high);
        }
    }
}

import java.io.*;
import java.util.*;

public class VasyaAndTheBus {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(f.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        if (n == 0)
        {
            if (m == 0)
                System.out.println("0 0");
            else
                System.out.println("Impossible");
            return;
        }
        int min = Math.max(n,m);
        int max = n+Math.max(m-1,0);
        System.out.println(min+" "+max);
    }
}

//JDK 10.0.1 | JDoodle.Com & 1.8.0_162 | CodeForces.Com
import java.util.Scanner;

public class Solution
{
    public static void main(String args[])
    {
        Scanner input = new Scanner(System.in);

        int grown_ups = input.nextInt();
        int children = input.nextInt();

        if (grown_ups < 1 & children > 0) {
            System.out.print("Impossible");
            return;
        }

        System.out.printf("%s %s", Math.max(grown_ups, children), children != 0 ? grown_ups + children - 1 : grown_ups);
    }
}

//Edwin Lunando template for online algorithm contest
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Main {

//  class node implements Comparable<node> {
//
//    public int a;
//    public int b;
//
//    public int compareTo(node a) {
//      if (a.b == this.b) {
//        return a.a - this.a;
//      } else {
//        return a.b - this.b;
//      }
//    }
//
//    public node(int a, int b) {
//      this.a = a;
//      this.b = b;
//    }
//  }
  private void solve() throws IOException {
    int n = nextInt();
    int m = nextInt();
    if (n ==0 && m ==0) {
      System.out.println("0 0");
    } else if (n == 0) {
      System.out.println("Impossible");
    } else if (m == 0) {
      System.out.println(n + " " + n);
    } else {
      int min = Math.max(n, m);
      int max = m + n - 1;
      System.out.println(min + " " + max);
    }
  }

  public static void main(String[] args) {
    try {
      br = new BufferedReader(new InputStreamReader(System.in));
      //br = new BufferedReader(new FileReader("input.txt"));
      out = new PrintWriter(System.out);
      //out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
      new Main().solve();
      out.close();
    } catch (Throwable e) {
      System.out.println(e);
      System.exit(239);
    }
  }
  static BufferedReader br;
  static StringTokenizer st;
  static PrintWriter out;

  static String nextToken() throws IOException {
    while (st == null || !st.hasMoreTokens()) {
      String line = br.readLine();
      if (line == null) {
        return null;
      }
      st = new StringTokenizer(line);
    }
    return st.nextToken();
  }

  static int nextInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  static long nextLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  static double nextDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  static int[] nextIntArray(int n) throws IOException {
    int[] temp = new int[n];
    for (int x = 0; x < n; x++) {
      temp[x] = nextInt();
    }
    return temp;
  }

  static long[] nextLongArray(int n) throws IOException {
    long[] temp = new long[n];
    for (int x = 0; x < n; x++) {
      temp[x] = nextLong();
    }
    return temp;
  }

  static String[] nextArray(int n) throws IOException {
    String[] temp = new String[n];
    for (int x = 0; x < n; x++) {
      temp[x] = nextToken();
    }
    return temp;
  }
}

import java.util.*;
import java.io.*;
import java.awt.Point;
import java.math.BigDecimal;
import java.math.BigInteger;

import static java.lang.Math.*;

// Solution is at the bottom of code

public class A implements Runnable{

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	BufferedReader in;
	OutputWriter out;
	StringTokenizer tok = new StringTokenizer("");

	public static void main(String[] args){
		new Thread(null, new A(), "", 128 * (1L << 20)).start();
	}

	/////////////////////////////////////////////////////////////////////

	void init() throws FileNotFoundException{
		Locale.setDefault(Locale.US);

		if (ONLINE_JUDGE){
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new OutputWriter(System.out);
		}else{
			in = new BufferedReader(new FileReader("input.txt"));
			out = new OutputWriter("output.txt");
		}
	}

	////////////////////////////////////////////////////////////////

	long timeBegin, timeEnd;

	void time(){
		timeEnd = System.currentTimeMillis();
		System.err.println("Time = " + (timeEnd - timeBegin));
	}

	void debug(Object... objects){
		if (ONLINE_JUDGE){
			for (Object o: objects){
				System.err.println(o.toString());
			}
		}
	}

	/////////////////////////////////////////////////////////////////////

	public void run(){
		try{
			timeBegin = System.currentTimeMillis();
			Locale.setDefault(Locale.US);

			init();
			solve();

			out.close();
			time();
		}catch (Exception e){
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	/////////////////////////////////////////////////////////////////////

	String delim = " ";

	String readString() throws IOException{
		while(!tok.hasMoreTokens()){
			try{
				tok = new StringTokenizer(in.readLine());
			}catch (Exception e){
				return null;
			}
		}

		return tok.nextToken(delim);
	}

	String readLine() throws IOException{
		return in.readLine();
	}

	/////////////////////////////////////////////////////////////////

	final char NOT_A_SYMBOL = '\0';

	char readChar() throws IOException{
		int intValue = in.read();

		if (intValue == -1){
			return NOT_A_SYMBOL;
		}

		return (char) intValue;
	}

	char[] readCharArray() throws IOException{
		return readLine().toCharArray();
	}

	/////////////////////////////////////////////////////////////////

	int readInt() throws IOException{
		return Integer.parseInt(readString());
	}

	int[] readIntArray(int size) throws IOException{
		int[] array = new int[size];

		for (int index = 0; index < size; ++index){
			array[index] = readInt();
		}

		return array;
	}

	///////////////////////////////////////////////////////////////////

	long readLong() throws IOException{
		return Long.parseLong(readString());
	}

	long[] readLongArray(int size) throws IOException{
		long[] array = new long[size];

		for (int index = 0; index < size; ++index){
			array[index] = readLong();
		}

		return array;
	}

	////////////////////////////////////////////////////////////////////

	double readDouble() throws IOException{
		return Double.parseDouble(readString());
	}

	double[] readDoubleArray(int size) throws IOException{
		double[] array = new double[size];

		for (int index = 0; index < size; ++index){
			array[index] = readDouble();
		}

		return array;
	}

	////////////////////////////////////////////////////////////////////

	BigInteger readBigInteger() throws IOException {
		return new BigInteger(readString());
	}

	BigDecimal readBigDecimal() throws IOException {
		return new BigDecimal(readString());
	}

	/////////////////////////////////////////////////////////////////////

	Point readPoint() throws IOException{
		int x = readInt();
		int y = readInt();
		return new Point(x, y);
	}

	Point[] readPointArray(int size) throws IOException{
		Point[] array = new Point[size];

		for (int index = 0; index < size; ++index){
			array[index] = readPoint();
		}

		return array;
	}

	/////////////////////////////////////////////////////////////////////

	List<Integer>[] readGraph(int vertexNumber, int edgeNumber)
	throws IOException{
		@SuppressWarnings("unchecked")
		List<Integer>[] graph = new List[vertexNumber];

		for (int index = 0; index < vertexNumber; ++index){
			graph[index] = new ArrayList<Integer>();
		}

		while (edgeNumber-- > 0){
			int from = readInt() - 1;
			int to = readInt() - 1;

			graph[from].add(to);
			graph[to].add(from);
		}

		return graph;
	}

	/////////////////////////////////////////////////////////////////////

	static class IntIndexPair {

		static Comparator<IntIndexPair> increaseComparator = new Comparator<A.IntIndexPair>() {

			@Override
			public int compare(IntIndexPair indexPair1, IntIndexPair indexPair2) {
				int value1 = indexPair1.value;
				int value2 = indexPair2.value;

				if (value1 != value2) return value1 - value2;

				int index1 = indexPair1.index;
				int index2 = indexPair2.index;

				return index1 - index2;
			}
		};

		static Comparator<IntIndexPair> decreaseComparator = new Comparator<A.IntIndexPair>() {

			@Override
			public int compare(IntIndexPair indexPair1, IntIndexPair indexPair2) {
				int value1 = indexPair1.value;
				int value2 = indexPair2.value;

				if (value1 != value2) return -(value1 - value2);

				int index1 = indexPair1.index;
				int index2 = indexPair2.index;

				return index1 - index2;
			}
		};

		int value, index;

		public IntIndexPair(int value, int index) {
			super();
			this.value = value;
			this.index = index;
		}
	}

	IntIndexPair[] readIntIndexArray(int size) throws IOException {
		IntIndexPair[] array = new IntIndexPair[size];

		for (int index = 0; index < size; ++index) {
			array[index] = new IntIndexPair(readInt(), index);
		}

		return array;
	}

	/////////////////////////////////////////////////////////////////////

	static class OutputWriter extends PrintWriter{

		final int DEFAULT_PRECISION = 12;

		int precision;
		String format, formatWithSpace;

		{
			precision = DEFAULT_PRECISION;

			format = createFormat(precision);
			formatWithSpace = format + " ";
		}

		public OutputWriter(OutputStream out) {
			super(out);
		}

		public OutputWriter(String fileName) throws FileNotFoundException {
			super(fileName);
		}

		public int getPrecision() {
			return precision;
		}

		public void setPrecision(int precision) {
			precision = max(0, precision);
			this.precision = precision;

			format = createFormat(precision);
			formatWithSpace = format + " ";
		}

		private String createFormat(int precision){
			return "%." + precision + "f";
		}

		@Override
		public void print(double d){
			printf(format, d);
		}

		public void printWithSpace(double d){
			printf(formatWithSpace, d);
		}

		public void printAll(double...d){
			for (int i = 0; i < d.length - 1; ++i){
				printWithSpace(d[i]);
			}

			print(d[d.length - 1]);
		}

		@Override
		public void println(double d){
			printlnAll(d);
		}

		public void printlnAll(double... d){
			printAll(d);
			println();
		}
	}

	/////////////////////////////////////////////////////////////////////

	int[][] steps = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
	int[][] steps8 = {
			{-1, 0}, {1, 0}, {0, -1}, {0, 1},
			{-1, -1}, {1, 1}, {1, -1}, {-1, 1}
	};

	boolean check(int index, int lim){
		return (0 <= index && index < lim);
	}

	/////////////////////////////////////////////////////////////////////

	boolean checkBit(int mask, int bitNumber){
		return (mask & (1 << bitNumber)) != 0;
	}

	/////////////////////////////////////////////////////////////////////

	void solve() throws IOException {
		int n = readInt();
		int m = readInt();

		if (n == 0 && m > 0) {
			out.println("Impossible");
			return;
		}

		int minSum = n + m - min(n, m);
		int maxSum = n + m - min(1, m);

		out.println(minSum + " " + maxSum);
	}
}

import java.io.BufferedOutputStream;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.Flushable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.InputMismatchException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	static class TaskAdapter implements Runnable {
		@Override
		public void run() {
			InputStream inputStream = System.in;
			OutputStream outputStream = System.out;
			FastReader in = new FastReader(inputStream);
			Output out = new Output(outputStream);
			AVasyaAndTheBus solver = new AVasyaAndTheBus();
			solver.solve(1, in, out);
			out.close();
		}
	}

	public static void main(String[] args) throws Exception {
		Thread thread = new Thread(null, new TaskAdapter(), "", 1<<29);
		thread.start();
		thread.join();
	}
	static class AVasyaAndTheBus {
		public AVasyaAndTheBus() {
		}

		public void solve(int kase, InputReader in, Output pw) {
			int n = in.nextInt(), m = in.nextInt();
			if(n==0) {
				if(m==0) {
					pw.println("0 0");
				}else {
					pw.println("Impossible");
				}
				return;
			}
			int min = n+Math.max(0, m-n), max = n+m-1;
			pw.println(min, Math.max(min, max));
		}

	}

	static interface InputReader {
		int nextInt();

	}

	static class FastReader implements InputReader {
		final private int BUFFER_SIZE = 1<<16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer;
		private int bytesRead;

		public FastReader(InputStream is) {
			din = new DataInputStream(is);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public int nextInt() {
			int ret = 0;
			byte c = skipToDigit();
			boolean neg = (c=='-');
			if(neg) {
				c = read();
			}
			do {
				ret = ret*10+c-'0';
			} while((c = read())>='0'&&c<='9');
			if(neg) {
				return -ret;
			}
			return ret;
		}

		private boolean isDigit(byte b) {
			return b>='0'&&b<='9';
		}

		private byte skipToDigit() {
			byte ret;
			while(!isDigit(ret = read())&&ret!='-') ;
			return ret;
		}

		private void fillBuffer() {
			try {
				bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			}catch(IOException e) {
				e.printStackTrace();
				throw new InputMismatchException();
			}
			if(bytesRead==-1) {
				buffer[0] = -1;
			}
		}

		private byte read() {
			if(bytesRead==-1) {
				throw new InputMismatchException();
			}else if(bufferPointer==bytesRead) {
				fillBuffer();
			}
			return buffer[bufferPointer++];
		}

	}

	static class Output implements Closeable, Flushable {
		public StringBuilder sb;
		public OutputStream os;
		public int BUFFER_SIZE;
		public boolean autoFlush;
		public String LineSeparator;

		public Output(OutputStream os) {
			this(os, 1<<16);
		}

		public Output(OutputStream os, int bs) {
			BUFFER_SIZE = bs;
			sb = new StringBuilder(BUFFER_SIZE);
			this.os = new BufferedOutputStream(os, 1<<17);
			autoFlush = false;
			LineSeparator = System.lineSeparator();
		}

		public void print(String s) {
			sb.append(s);
			if(autoFlush) {
				flush();
			}else if(sb.length()>BUFFER_SIZE >> 1) {
				flushToBuffer();
			}
		}

		public void println(Object... o) {
			for(int i = 0; i<o.length; i++) {
				if(i!=0) {
					print(" ");
				}
				print(String.valueOf(o[i]));
			}
			println();
		}

		public void println(String s) {
			sb.append(s);
			println();
			if(autoFlush) {
				flush();
			}else if(sb.length()>BUFFER_SIZE >> 1) {
				flushToBuffer();
			}
		}

		public void println() {
			sb.append(LineSeparator);
		}

		private void flushToBuffer() {
			try {
				os.write(sb.toString().getBytes());
			}catch(IOException e) {
				e.printStackTrace();
			}
			sb = new StringBuilder(BUFFER_SIZE);
		}

		public void flush() {
			try {
				flushToBuffer();
				os.flush();
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public void close() {
			flush();
			try {
				os.close();
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

	}
}

import java.util.*;
import java.io.*;
import java.math.*;

public class A {
    public static Scanner scan = new Scanner(System.in);
    public static boolean bg = true;

    public static void main(String[] args) throws Exception {
        int n1 = Integer.parseInt(scan.next());
        int n2 = Integer.parseInt(scan.next());
        if (n1 == 0){
            if (n2 == 0) System.out.println("0 0");
            else System.out.println("Impossible");
        }
        else {
            int min = n2 - n1;
            if (min<0) min = 0;
            int max = n2 - 1;
            if (max<0) max = 0;
            System.out.println((n1+min)+" "+(n1+max));
        }
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
      int n = input.nextInt();
      int m = input.nextInt();
//      if(n==0&&m==0)
//      {
//           System.out.println(n+" "+m);
//           return;
//      }
//
      if(n==0&&m!=0)
      {
          System.out.println("Impossible");
          return;
      }
      else if(m==0)
      {
          System.out.println(n+" "+n);
          return;
      }
      else if(m<n)
      {
          System.out.println(n+" "+(m+(n-1)));
          return;
      }

        System.out.print(((n*(m/n))+m%n)+" ");
        System.out.println(m+(n-1));

    }

}

import java.util.*;
public class a {
public static void main(String[] args)
{
    Scanner input = new Scanner(System.in);
    int a = input.nextInt(),b = input.nextInt();
    if(a==0)
        System.out.println(b > 0 ? "Impossible" : "0 0");
    else
    {
        int max = a+b-Math.min(b,1), min = a+b-Math.min(a, b);
        System.out.println(min + " " + max);
    }
}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

public class A120
{
        public static void main(String[] Args)
        {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                CodeA120 solver = new CodeA120();
                solver.solve(1, in, out);
                out.close();
        }
}

class CodeA120
{
	public void solve(int testNumber, InputReader in, PrintWriter out)
	{
		int n=in.nextInt();
		int m=in.nextInt();
		int max=0;
		int min=0;
		if((n==0)&&(m!=0))
		{
			out.println("Impossible");
		}
		else if(m!=0)
		{
			max=n+m-1;
			min=n;
			m=m-n;
			if(m>0)
			{
				min+=m;
			}
			out.println(min+" "+max);
		}
		else
		{
			out.println(n+" "+n);
		}

	}

}

class InputReader
{
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream)
    {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next()
    {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
        {
            try
            {
                tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (IOException e)
            {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt()
    {
        return Integer.parseInt(next());
    }

    public long nextLong()
    {
        return Long.parseLong(next());
    }
    public double nextDouble()
    {
        return Double.parseDouble(next());
    }

}

import java.util.Scanner;public class a{public static void main(String args[]){Scanner z=new Scanner(System.in);int a=z.nextInt();int b=z.nextInt();if(a<1&b>0){System.out.print("Impossible");return;}System.out.printf("%s %s",Math.max(a,b),b!=0?a+b-1:a);}}

//Codeforces 120 A
//16/05/2012 10:01:03
import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
import java.awt.geom.*;
import static java.lang.System.out;
import static java.util.Collections.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.math.BigDecimal.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Double.*;
import static java.lang.Character.*;

public class Main
{
	public static void main(String[] args) throws Exception
	{
		Main prog = new Main();
		prog.run();
	}
	void run() throws Exception
	{
		Parser in = new Parser();
		int a = in.nextInteger();
		int n = in.nextInteger();
		if(a==0 && n==0)
			out.println("0 0");
		else if(a!=0 && n==0)
			out.println(a+" "+a);
		else if(a==0 && n!=0)
			out.println("Impossible");
		else
		{
			int maximo = n + a - 1;
			int minimo = Math.max(n,a);
			out.println(minimo + " " + maximo);
		}
	}
}

class Parser
{
	BufferedReader	buf;
	StringTokenizer	tok;
	Parser() throws Exception
	{
		//buf = new BufferedReader(new InputStreamReader(new FileInputStream("in.txt")));
		buf = new BufferedReader(new InputStreamReader(System.in));
		tok = new StringTokenizer("");
	}
	String nextString() throws Exception
	{
		while(!tok.hasMoreTokens())
		{
			String s = buf.readLine();
			if (s != null)
				tok = new StringTokenizer(s);
			else
				return null;
		}
		return tok.nextToken();
	}
	String nextLine() throws Exception
	{
		tok = new StringTokenizer("");
		return buf.readLine();
	}
	Integer nextInteger() throws Exception
	{
		return nextInteger(10);
	}
	Integer nextInteger(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? parseInt(s,radix): null;
	}
	Long nextLong() throws Exception
	{
		return nextLong(10);
	}
	Long nextLong(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? parseLong(s,radix): null;
	}
	Double nextDouble() throws Exception
	{
		String s = nextString();
		return (s != null)? parseDouble(s): null;
	}
	BigInteger nextBigInteger() throws Exception
	{
		return nextBigInteger(10);
	}
	BigInteger nextBigInteger(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? new BigInteger(s,radix): null;
	}
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.*;

public class A
{
	BufferedReader in;
	PrintStream out;
	StringTokenizer tok;
	public A() throws NumberFormatException, IOException
	{
		in = new BufferedReader(new InputStreamReader(System.in));
		//in = new BufferedReader(new FileReader("in.txt"));
		out = System.out;
		run();
	}
	void run() throws NumberFormatException, IOException
	{
		int n = nextInt();
		int m = nextInt();
		if(n==0 && m>0) out.println("Impossible");
		else out.println((n+Math.max(m-n,0)) + " " +(n+Math.max(m-1,0)));
	}
	public static void main(String[] args) throws NumberFormatException, IOException
	{
		new A();
	}
	String nextToken() throws IOException
	{
		if(tok ==null || !tok.hasMoreTokens()) tok = new StringTokenizer(in.readLine());
		return tok.nextToken();
	}
	int nextInt() throws NumberFormatException, IOException
	{
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws NumberFormatException, IOException
	{
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws NumberFormatException, IOException
	{
		return Double.parseDouble(nextToken());
	}
}

import java.util.Scanner;

public class VasyaAndTheBus190A {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int k = scan.nextInt();
		if (a == 0 && k == 0) {
			System.out.println("0 0");
			return;
		} else if (a == 0) {
			System.out.println("Impossible");
			return;
		}
		int min = a + k - Math.min(a, k);
		int max = Math.max(min, a + k - 1);
		System.out.printf("%d %d\n", min, max);
	}
}

import java.util.*;
import java.io.*;

public class Div2A {

	public static void main(String[] args) throws IOException {
		new Div2A().run();
	}

	FastScanner in;
	PrintWriter out;

	void run() throws IOException {
		in = new FastScanner(System.in);
		out = new PrintWriter(System.out, true);
		solve();
		out.close();
	}

	void solve() throws IOException {
		int n = in.nextInt();
		int m = in.nextInt();
		if (n == 0) {
			out.println(m == 0 ? "0 0" : "Impossible");
			System.exit(0);
		}
		out.println((Math.max(n, m)) + " " + (n + Math.max(0, m - 1)));
	}

	static class FastScanner {

		BufferedReader br;
		StringTokenizer st;

		FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = null;
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		String nextLine() throws IOException {
			if (st == null || !st.hasMoreTokens())
				return br.readLine();
			StringBuilder result = new StringBuilder(st.nextToken());
			while (st.hasMoreTokens()) {
				result.append(" ");
				result.append(st.nextToken());
			}
			return result.toString();
		}

		int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

	}

}

import java.io.*;
public class vnb
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n,m;

int min=0,max=0;

String z[]=br.readLine().split(" ");

n=Integer.parseInt(z[0]);
m=Integer.parseInt(z[1]);

if(m>=n)
{
min=m;
}

else
{
min=n;
}

if(m==0)
{
max=n;
}
else
{
max=(m+n)-1;
}

if(n==0&&m==0)
{
System.out.println("0 0");
}
else if(n==0&&m!=0)
{
System.out.println("Impossible");
}
else
{
System.out.println(min+" "+max);
}

}
}

import java.io.*;
import java.util.*;
import java.math.*;

public class Solution
{
    public static void main(String[] args) throws IOException
    {
        new Solution().run();
    }
    StreamTokenizer in;
    Scanner ins;
    PrintWriter out;
    int nextInt() throws IOException
    {
        in.nextToken();
        return (int)in.nval;
    }
    ForGCD gcd(int a,int b)
    {
        ForGCD tmp = new ForGCD();
        if(a == 0)
        {
            tmp.x = 0;
            tmp.y = 1;
            tmp.d = b;
        }
        else
        {
            ForGCD tmp1 = gcd(b%a, a);
            tmp.d = tmp1.d;
            tmp.y = tmp1.x;
            tmp.x = tmp1.y - tmp1.x*(b/a);
        }
        return tmp;
    }
    void run() throws IOException
    {

        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        ins = new Scanner(System.in);
        out = new PrintWriter(System.out);
        try
        {
            if(System.getProperty("xDx")!=null)
            {
                in = new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));
                ins = new Scanner(new FileReader("input.txt"));
                out = new PrintWriter(new FileWriter("output.txt"));
            }
        }
        catch(Exception e)
        {
        }
        int n = nextInt(), m = nextInt();
        if(n==0 && m>0)
            out.print("Impossible");
        else
        {
            out.printf("%d %d",m+n-Math.min(m, n),m+n-Math.min(1, m));
        }
        out.close();
    }

    class ForGCD
    {
        int x,y,d;
    }

    class Team implements Comparable
    {
        public int p,t;
        public int compareTo(Object obj)
        {
            Team a = (Team) obj;
            if(p>a.p || p==a.p && t<a.t)
                return -1;
            else
                if(p==a.p && t==a.t)
                    return 0;
                else
                    return 1;
        }

    }
}

import java.util.Scanner;

public class Fare{
	public static int min(int n, int m){
		int child = m-n >= 0 ? m-n : 0;
		return n+child;
	}

	public static int max(int n, int m){
		if( m == 0 ){
			return n;
		}
		return n+m-1;
	}

	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		if( n <= 0 && m > 0 ){
			System.out.println("Impossible");
		} else {
			System.out.println(min(n,m) + " " + max(n,m));
		}
	}
}

import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
import java.text.DecimalFormat;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
        IO io = new IO(null, null);
        int n = io.getNextInt(),m = io.getNextInt();
        if (n == 0 && m == 0) io.println("0 0");
        else if (n == 0) io.println("Impossible");
        else {
            int mn = n;
            if (m > n) mn += m - n;
            int mx = n + m;
            if (m > 0) mx--;
            io.println(mn + " " + mx);
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }
    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}

import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        if(n==0 && m!=0){
            System.out.println("Impossible");
            return;
        }
        int min = m<=n?n:m;
        int max = m+n-1;
        if(m==0) max=min=n;
        System.out.println(min+" "+max);
    }
}

/*
 *
 * @Author  Ajudiya_13(Bhargav Girdharbhai Ajudiya)
 * Dhirubhai Ambani Institute of Information And Communication Technology
 *
 */

import java.util.*;
import java.io.*;
import java.lang.*;

public class Code170
{

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static long mod = 1000000007;
	public static int d;
	public static int p;
	public static int q;

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static void extendedEuclid(int A,int B)
	{
		if(B==0)
		{
			d = A;
			p = 1 ;
			q = 0;
		}
		else
		{
			extendedEuclid(B, A%B);
			int temp = p;
			p = q;
			q = temp - (A/B)*q;
		}
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}

	public static void main(String[] args)
	{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int n = in.nextInt();
		int m = in.nextInt();

		if(n==0 && m!=0)
			pw.print("Impossible");
		else
		{
			int min = 0;
			int max = 0;
			if(n>=m)
				min = n;

			else
				min = m;

			if(m>0)
				max = m+n-1;
			else
				max = m+n;
			pw.println(min + " " + max);
		}

		pw.flush();
		pw.close();
	}
}

import java.io.*;
import java.util.StringTokenizer;

public class A190 {
    public static void main(String[] args) throws IOException {
        BufferedReader data=new BufferedReader(new InputStreamReader(System.in));
       String s=data.readLine();
       StringTokenizer st=new StringTokenizer(s);
       String key=st.nextToken();
       int n=Integer.parseInt(key);
       key=st.nextToken();
       int m=Integer.parseInt(key);
       if(n==0 && m!=0) System.out.println("Impossible");
       else if(n!=0 && m==0 || n==0 && m==0) System.out.println(n+" "+n);
       else if(m<=n) System.out.println(n+" "+(m-1+n));
       else if(m>n) {
       int c=m-n;
           System.out.println(m+" "+(m-1+n));

       }
    }

}

import java.io.BufferedInputStream;
import java.util.*;
import static java.lang.Math.*;

public class C190A {

	public void solve() throws Exception {
		int n = nextInt();
		int m = nextInt();
		if (n == 0) {
			if (m == 0) {
				println(0, 0);
			} else {
				println("Impossible");
			}
		} else {
			if (m == 0) {
				println(n, n);
			} else {
				println(max(n, m), m + n - 1);
			}
		}
	}

	// ------------------------------------------------------

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	void print(Object... os) {
		if (os != null && os.length > 0)
			System.out.print(os[0].toString());
		for (int i = 1; i < os.length; ++i)
			System.out.print(" " + os[i].toString());
	}

	void println(Object... os) {
		print(os);
		System.out.println();
	}

	BufferedInputStream bis = new BufferedInputStream(System.in);

	String nextWord() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c > ' ') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	String nextLine() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c != '\n' && c != '\r') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextWord());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextWord());
	}

	public static void main(String[] args) throws Exception {
		new C190A().solve();
	}
}

import java.io.*;
import java.util.*;

public class Bus190A {
	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(f.readLine());
		int a = Integer.parseInt(st.nextToken());
		int c = Integer.parseInt(st.nextToken());
		if(a!=0){
			int min = 0;
			int max = 0;
			if(a>=c){
				min=a;
			}
			else{
				min=c;
			}
			if(c==0){
				max=a;
			}
			else{
				max=a+c-1;
			}
			System.out.println(min+" "+max);
		}
		else{
			if(c==0){
				System.out.println("0 0");
			}
			else{
				System.out.println("Impossible");
			}
		}
	}
}

import java.util.*;

public class VasyaBus190A
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");   // Grownups
        int n = sc.nextInt();
        // System.out.println("Enter m");   // Children
        int m = sc.nextInt();

        if (n==0 && m==0)
        {
            System.out.println("0 0");
            return;
        }
        if (n==0)
        {
            System.out.println("Impossible");
            return;
        }
        if (m==0)
        {
            System.out.println(n + " " + n);
            return;
        }

        // Minimum--spread children out over all adults
        if (m <= n)
        {
            System.out.print(n + " " );
        }
        else
        {
            System.out.print(m + " ");
        }
        // Maximum--all children with a single adult
        System.out.println(n+m-1);
    }
}

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.InputMismatchException;
import java.util.StringTokenizer;

public class Main {

        static class InputReader {

        final private int BUFFER_SIZE = 1 << 17;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public InputReader(InputStream in) {
            din = new DataInputStream(in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public byte next() {
            try {
                return read();
            } catch (Exception e) {
                throw new InputMismatchException();
            }
        }

        public String nextString() {
            StringBuilder sb = new StringBuilder("");
            byte c = next();
            while (c <= ' ') {
                c = next();
            }
            do {
                sb.append((char) c);
                c = next();
            } while (c > ' ');
            return sb.toString();
        }

        public int nextInt() {
            int ret = 0;
            byte c = next();
            while (c <= ' ') {
                c = next();
            }
            boolean neg = c == '-';
            if (neg) {
                c = next();
            }
            do {
                ret = (ret << 3) + (ret << 1) + c - '0';
                c = next();
            } while (c > ' ');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() {
            try {
                bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }
    }

    public static void main(String arg[]) throws IOException {

      InputReader r=new InputReader(System.in);

       // BufferedReader r=new BufferedReader(new FileReader("testcase.txt"));
       //BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter p = new PrintWriter(System.out, false);

        int n=r.nextInt();
        int m=r.nextInt();
        if(n==0&&m==0)
        {
            p.print(0+" "+0);
        }
        else if(n==0)
        {
            p.print("Impossible");
        }
        else if(m==0)
        {
            p.print(n+" "+n);
        }
        else
        {
            p.print((n+((m-n)>0?(m-n):0))+" "+(n+m-1));
        }

        p.flush();

    }}

import java.util.Scanner;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        if (n == 0 && m != 0)
            System.out.print("Impossible");
        else {
            if (m==0) {
                System.out.print(n+" ");
                System.out.println(n);
            }
            else {
                if (n > m) {
                    System.out.print(n + " ");
                    System.out.print(n + m - 1);
                } else {
                    System.out.print((m / n) * n + m % n + " ");
                    System.out.print(n + m - 1);
                }
            }
        }
    }

}

import java.util.*;
import java.math.*;
import java.io.*;

public class Main
	{
	public static void main(String args[]) throws IOException
		{
		Scanner c=new Scanner(System.in);
		int n=c.nextInt();
		int m=c.nextInt();

		int min=0,max;
		if(n==0&&m!=0)
			{
			System.out.println("Impossible");
			return ;
			}

		if(n<=m)			//less parents
			{
			min=m;
			max=n+m-1;

			if(m==0)
				{
				min=n;
				max=n;
				}
			}
		else
			{
			min=n;
			max=n+m-1;

			if(m==0)
				{
				min=n;
				max=n;
				}
			}
		System.out.println(min+" "+max);
		}
	}

//must declare new classes here

import java.io.*;
import java.util.*;

public class A {
    public static void solution(PrintWriter out) throws IOException {
        int n = in.nextInt(), m = in.nextInt();
        if (n == 0 && m > 0)
            out.println("Impossible");
        else
            out.printf("%d %d\n", n + m - Math.min(n, m),
                    n + m - Math.min(1, m));
    }

    public static void main(String[] args) throws Exception {
        in.init();
        PrintWriter out = new PrintWriter(new BufferedWriter(
                new OutputStreamWriter(System.out)));
        solution(out);
        out.close();
    }

    protected static class in {
        private static BufferedReader reader;
        private static StringTokenizer tokenizer;

        public static void init() throws FileNotFoundException {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = new StringTokenizer("");
        }

        public static String next() throws IOException {
            while (!tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(reader.readLine());
            return tokenizer.nextToken();
        }

        public static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public static long nextLong() throws IOException {
            return Long.parseLong(next());
        }
    }
}

import java.util.Scanner;

public class CF190A {
        static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int m,n;
		int mx,mn;
		n=sc.nextInt();
		m=sc.nextInt();
		mn=mx=0;
		if(m==0 && n==0)
		{
			System.out.println("0 0");
			return;
		}
		else if(n==0)
		{
			System.out.println("Impossible");
			return;
		}
		else {
			if(m<=n)
			{
				mn=n;
			    if(m>0)
			    	mx=n+(m-1);
			    else {
					mx=n;
				}
			}
			else {
				mn=n+(m-n);
				mx=n+(m-1);
			}
		}
		System.out.println(mn+" "+mx);

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int n = in.nextInt(), m = in.nextInt();

            int min = 0, max = 0;
            if (n == 0 && m > 0) {
                out.print("Impossible");
                return;
            } else if (m == 0) {
                min = n;
                max = n;
            } else {
                max = m + n - 1;
                min = n + (m <= n ? 0 : m - n);
            }

            out.print(min + " " + max);
        }

    }
}

import java.io.*;
import java.security.SecureRandom;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	public void solve() throws Exception {
		int n = sc.nextInt();
		int m = sc.nextInt();
		if (n == 0 && m == 0) {
			out.println("0 0");
			return;
		}
		if (n == 0) {

			out.println("Impossible");
			return;
		}
		int maxAns = n + (m != 0 ? (m - 1) : 0);
		int minAns = n + m - min(n, m);
		out.println(minAns + " " + maxAns);
    }

    /*--------------------------------------------------------------*/

    static String filename = "";
    static boolean fromFile = false;

    BufferedReader in;
    PrintWriter out;
    FastScanner sc;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 1 << 25).start();
    }

    public void run() {
        try {
            init();
            solve();
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            out.close();
        }
    }

    void init() throws Exception {
    	if (fromFile) {
    		in = new BufferedReader(new FileReader(filename+".in"));
        	out = new PrintWriter(new FileWriter(filename+".out"));
    	} else {
    		in = new BufferedReader(new InputStreamReader(System.in));
        	out = new PrintWriter(System.out);
    	}
        sc = new FastScanner(in);
    }
}

class FastScanner {

    BufferedReader reader;
    StringTokenizer strTok;

    public FastScanner(BufferedReader reader) {
        this.reader = reader;
    }

    public String nextToken() throws IOException {
        while (strTok == null || !strTok.hasMoreTokens()) {
            strTok = new StringTokenizer(reader.readLine());
        }

        return strTok.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public BigInteger nextBigInteger() throws IOException {
    	return new BigInteger(nextToken());
    }

    public BigDecimal nextBigDecimal() throws IOException {
    	return new BigDecimal(nextToken());
    }
}

import java.util.Scanner;

public class A {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();

        if( n == 0 ){
            if(m == 0){
                System.out.println("0 0");
            }else{
                System.out.println("Impossible");
            }
        }else if(n <= m){
            System.out.print(m);
            System.out.print(" ");
            System.out.println(m + n - 1);
        }else{
            System.out.print(n);
            System.out.print(" ");
            if(m == 0){
                System.out.println(n);
            }else{
                System.out.println(m + n - 1);
            }
        }
    }
}

import java.io.*;
import java.util.*;

public class R120TaskA implements Runnable {

    public static void main(String[] args) {
        new Thread(new R120TaskA()).start();
    }

    public void run() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solve(in, out);
        out.close();
    }

    class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }

    void solve(InputReader reader, PrintWriter writer) {
        long adults = reader.nextLong();
        long children = reader.nextLong();

        if (adults == 0 && children != 0) {
            writer.print("Impossible");
            return;
        }
        long max;
        if (children == 0) {
            max = adults;
        } else {
            max = adults + children - 1;
        }
        long min;
        if (adults >= children) {
            min = adults;
        } else {
            min = adults + (children - adults);
        }
        writer.print("" + min + " " + max);
    }
}

import java.io.*;
import java.util.*;

public class Main {
  BufferedReader br;
  int n, m, min, max;

  public Main() throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
  }

  public void go() throws Exception {
    String[] ss = br.readLine().split(" ");
    n = Integer.parseInt(ss[0]);
    m = Integer.parseInt(ss[1]);
    if (n == 0 && m == 0)
      System.out.println("0 0");
    else if (n == 0)
      System.out.println("Impossible");
    else if (m == 0)
      System.out.println(n + " " + n);
    else {
      min = n + m - Math.min(n, m);
      max = n + m - 1;
      System.out.println(min + " " + max);
    }
  }

  public static void main(String[] args) throws Exception {
    new Main().go();
  }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws IOException {
        Scanner in= new Scanner(System.in);
        int n=in.nextInt(); int m=in.nextInt();
        //0 2 | 2 0 | 3 8 | 9 2 |
        if(n==0){
            if(m==0)
                System.out.println("0 0");
            else
                System.out.println("Impossible");
        }
        else if(n>0 && m==0){
            System.out.println(n+" "+n);
        }
        else if(n>=m){
            System.out.println(n+" "+( (n+m)-1 ));
        }
        else if(n<m){
            //1 2
            System.out.println( (m-n)+n +" " + ((n+m)-1) );
        }
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.TreeSet;

public class myFile
{
	public static void main(String args[])
	{
		int n,ans1,m,ans2;
        Scanner sc = new Scanner(System.in);
	    while(sc.hasNextInt())
	    {
	    	n = sc.nextInt();
	    	m = sc.nextInt();
	    	if(n==0 && m>0)
	    	{
	    		System.out.println("Impossible");
	    		continue;
	    	}
	    	if(n==0 && m==0)
	    	{
	    		System.out.println("0 0");
	    		continue;
	    	}
	        int z = Math.max(0,m-1);
	    	ans1 = n+z;
	    	m = m-n;
	    	z = Math.max(0,m);
	    	ans2 = n+z;
	    	System.out.println(ans2+" "+ans1);
	    }
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class VasyaAndTheBus {
      public static void main(String[] args) throws IOException
      {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int n=Integer.parseInt(st.nextToken());
            int m=Integer.parseInt(st.nextToken());
            if(n==0)
            {
                if(m==0)System.out.print("0 0");
                else System.out.print("Impossible");
            }
            else
            {

                if(m==0)System.out.print(n+" "+n);
                else
                {
                    int min=(m+n)-Math.min(n, m);
                    int max=n+m-1;
                    System.out.print(min+" "+max);
                }

            }

      }
}

import java.util.Scanner;

public class VasyaAndTheBus190A {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int k = scan.nextInt();
		if (a == 0 && k == 0) {
			System.out.println("0 0");
			return;
		} else if (a == 0) {
			System.out.println("Impossible");
			return;
		}
		int min = a + k - Math.min(a, k);
		int max = Math.max(min, a + k - 1);
		System.out.printf("%d %d\n", min, max);
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CF190A {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] nm = in.readLine().split(" ");
		int n = Integer.parseInt(nm[0]);
		int m = Integer.parseInt(nm[1]);
		if (n == 0 && m == 0) {
			System.out.println(0 + " " + 0);
			return;
		}
		if (n == 0) {
			System.out.println("Impossible");
			return;
		}
		if (m == 0) {
			System.out.println(n + " " + n);
			return;
		}
		int min = 0;
		if (n > m) {
			int tn = n;
			for (int i = 0; i < m; i++) {
				min += 1;
				tn -= 1;
			}
			min += tn;
		} else {
			min = m;
		}

		int max = n - 1 + m;
		System.out.println(min + " " + max);
	}
}

import java.util.Scanner;

public class Task190A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		sc.close();

		if (n == 0) {
			if (m == 0) {
				System.out.println("0 0");
				return;
			} else {
				System.out.println("Impossible");
				return;
			}
		}
		if (m == 0) {
			System.out.println(n + " " + n);
			return;
		}

		int max = n + m - 1;
		if (n >= m) {
			System.out.println(n + " " + max);
		} else {
			System.out.println(m + " " + max);
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	static int []arreglo;
	 public static void main(String []args)throws IOException
	 {
		 BufferedReader sa= new BufferedReader(new InputStreamReader(System.in));
		 PrintWriter res1=new PrintWriter(new OutputStreamWriter(System.out));
		 StringTokenizer res=new StringTokenizer(sa.readLine());

		 int a=Integer.parseInt(res.nextToken());
		 int b=Integer.parseInt(res.nextToken());

		 if(a>1){
			if(a>b){
				if(b==0){
					int aux2=a;
					res1.print(aux2+" "+aux2);
				}
				else
		 {int aux2=a;
		 int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);}

			}
			else{
				int aux2=a+(b-a);
				int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);
			}

		}
		 else
		 {
			 if(a==0 &&b!=0)
			 {
				 res1.print("Impossible");

			 }

			 if(a==1 && b!=0)
			 {

                 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);
			 }

			 if(a==0&& b==0)
			 {
				 res1.print(0+" "+0);
			 }
			 if(a==1 && b==0)
			 {

                 int aux1=a;

				 res1.print(a+" "+a);
			 }

		 }
		 res1.flush();
	 }
	 }

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.FileReader;
import java.io.FileWriter;
//import java.lang.StringBuilder;
import java.util.StringTokenizer;
//import java.lang.Comparable;
//import java.util.Arrays;
//import java.util.HashMap;
//import java.util.ArrayList;
//import java.util.LinkedList;

public class Exams {

    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter out = new PrintWriter(System.out);
    //static StringBuilder sb = new StringBuilder();

    public static void main(String[] args) throws IOException {
        StringTokenizer st = new StringTokenizer(in.readLine());
        //BufferedReader in = new BufferedReader(new FileReader("input.txt"));
        //PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
        int a = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if(a == 0) {
            if(k == 0) {
                out.print("0 0");
            } else {
                out.print("Impossible");
            }
        } else {
            int min = Math.max(k, a);
            int max = a + Math.max(k - 1, 0);
            out.print(min + " " + max);
        }
        out.close();
    }
}

/*
 ******************************************************************************
 * MIT License                                                                *
 * Copyright (c) 2020 - Present Viral Lalakia                                 *
 ******************************************************************************
 */

//package com.virallalakia.codeforces;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

/**
 * This is a solution for Vasya and the Bus problem of Codeforces.
 * This is verified on https://codeforces.com. Package definition needs to be removed before submission.
 *
 * @author Viral Lalakia
 */
public class VasyaAndTheBus {

  private static final Scanner SYS_IN =
      new Scanner(new BufferedReader(new InputStreamReader(System.in)));

  /**
   * Main method for solution. Calls to evaluate one or more test cases.
   */
  public static void main(String[] args) {
    evaluateCase();
    SYS_IN.close();
  }

  /**
   * Evaluate a test case. Handles I/O.
   */
  private static void evaluateCase() {
    try {
      int n = SYS_IN.nextInt();
      int m = SYS_IN.nextInt();
      SYS_IN.nextLine();

      if (n == 0 && m > 0) {
        System.out.println("Impossible");
      } else {
        System.out.println(((long)n + m - Math.min(n, m)) + " " + ((long)n + m - Math.min(1, m)));
      }
    } catch (Exception e) {}
  }
}

//package test;
//java
import java.util.Scanner;

public class methods {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n, m;
        n = input.nextInt();
        m = input.nextInt();
        if (m == 0 && n == 0)
            System.out.println(n + " " + n);
        else if (n == 0)
            System.out.println("Impossible");
        else if (m == 0)
            System.out.println(n + " " + n);

        else if (n == m)
            System.out.println(n + " " + (n + (m - 1)));
        else if (n < m)
            System.out.println((n + (m - n)) + " " + (n + (m - 1)));
        else if (n > m)
            System.out.println(n + " " + ((n - 1) + (1 + (m - 1))));

    }

}

//http://rextester.com java 1.8.0_111
import java.util.*;
public class a{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        if(a<1&b>0){System.out.print("Impossible");return;}
        int c=a+b-1;
        if(b==0)c=a;
        System.out.print(Math.max(a,b)+" "+c);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Ivanov A.K.
 */
public class A {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter pw;

    void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();

        if (n == 0 && m == 0)  { System.out.println("0 0"); return; }
        else if (n == 0) {
            System.out.println("Impossible"); return;
        }

        int t = (m == 0)?0:1;
        if (n >= m) {
            System.out.println(n + " " + (m + n  - t) );
        } else
            System.out.println(m + " " + (m + n - t) );
    }

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(System.out);
            solve();
            pw.close();
            reader.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new A().run();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
//
//    long nextLong() throws IOException {
//        return Long.parseLong(nextToken());
//    }
//
//    double nextDouble() throws IOException {
//        return Double.parseDouble(nextToken());
//    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}

import java.io.*;
import java.util.*;
import java.lang.*;
    public class templ {
        public static int a[]=new int[1000000];
    int binarySearch(long arr[], int l, int r, long x)
    {
        if (r >= l)
        {
            int mid = l + (r - l)/2;
            if (arr[mid] == x)
            return mid;
            if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
            return binarySearch(arr, mid+1, r, x);
        }
        return -1;
    }
    int partition(int arr[], int low, int high)
    {
        int pivot = arr[high];
        int i = (low-1);
        for (int j=low; j<high; j++)
        {
            if (arr[j] <= pivot)
            {
                i++;
                int temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
                /*temp = a[i];
                a[i] = a[j];
                a[j] = temp;*/
            }
        }
        int temp = arr[i+1];
        arr[i+1] = arr[high];
        arr[high] = temp;
        /*temp = a[i+1];
        a[i+1] = a[high];
        a[high] = temp;*/

        return i+1;
    }
    void sort(int arr[], int low, int high)
    {
        if (low < high)
        {
            int pi = partition(arr, low, high);
            sort(arr, low, pi-1);
            sort(arr, pi+1, high);
        }
    }
    public static void main(String[] args) throws FileNotFoundException {
     try
     {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        templ ob=new templ();
        int n=in.nextInt();
        int m=in.nextInt();
        if(n==0&&m!=0)
            out.println("Impossible");
        else if(m==0)
        {
            out.println(n+" "+n);
        }
        else
        {
            out.println(Math.max(n,m)+" "+(n+m-1));
        }
        out.close();
    }
        catch(Exception e){
        return;
    }
    }
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}

import java.util.Scanner;

public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scr = new Scanner(System.in);
		int n = scr.nextInt();
		int m = scr.nextInt();
	/*
		if ((n == 0) && (m == 0)) {
			System.out.println("0 0");
		}
	*/
		if ((n == 0) && (m != 0)) {
			System.out.println("Impossible");
		}
		else {
			int minsum = n;
			if (n < m){
				minsum += (m-n);
			}
			int maxsum = n + ((m > 0)? (m-1):0);
			System.out.println(minsum + " " + maxsum);
		}

	}

}

import java.util.*;
public class Main {

	public static void main (String [] args){

	 Scanner in = new Scanner (System.in);

	 int n= in.nextInt();
	    int m=in.nextInt();

	    if(n==0 && m==0)
	    	System.out.print(0 + " " + 0);

	    else if(n==0)
	   System.out.print("Impossible");

	   else if(m==0)
	   	 System.out.print(n + " " + n);

	   	 else if(n==1)
	   	 System.out.print(m + " " + m);

	    	else if(n==m || n>m)
	     System.out.print(n + " " + (n+ m-1));

	     else if(m>n)
	     System.out.print(m + " " +(n+ m-1));

	}
}

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int n, m;
		n = cin.nextInt();
		m = cin.nextInt();
		if(n == 0){
			if(m==0)
				System.out.println("0 0");
			else
				System.out.println("Impossible");
		} else {
			if(m==0)
				System.out.println(String.format("%d %d", n,n));
			else
				System.out.println(String.format("%d %d", n+m-Math.min(n, m),n+m-1));
		}

	}

}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), m = in.nextInt();
        if (n == 0 && m != 0) {
            System.out.print("Impossible");
            return;
        }
        if (m <= n) {
            System.out.print(n + " ");

        } else System.out.print(m + " ");
        System.out.print(n + m - (m == 0 ? 0 : 1));
    }
}

import java.util.Scanner;

public class CF
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), m = scan.nextInt();
		if (m == 0)
		{
			System.out.println(n + " " + n);
			return;
		}
		if (n == 0)
		{
			System.out.println("Impossible");
			return;
		}
		int min = Math.max(n, m);
		int max = n + m-1;
		System.out.println(min + " " + max);

		scan.close();
	}
}

import java.util.Scanner;

public class P_190_A_VasyaAndTheBus {

    public static void main(String[] args) {

        Scanner x = new Scanner(System.in);
        int n = x.nextInt();
        int m = x.nextInt();
        if (n == 0) {
            if(m!=0)
            System.out.println("Impossible");
            else
                System.out.println("0 0");
            return;
        }
        if (m == 0) {
            System.out.println(n + " " + n);
        } else {
            if (n >= m) {
                int min = n;
                int max = n + m - 1;
                System.out.println(min + " " + max);
            } else {

                int min=m;
                int max= m+n-1;
                System.out.println(min+" "+max);
            }
        }
    }

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
import java.io.PrintWriter;
public class TestClass {
    public static void main(String args[] ) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter pw = new PrintWriter(System.out);
    //Scannar sc=new Scannar(System.in);
    String[] s= br.readLine().split(" ");
    int n = Integer.parseInt(s[0]);
    int m = Integer.parseInt(s[1]);
    if( n==0 && m==0){
        System.out.println("0 0");
    }else if(m==0){
        System.out.println(n+ " "+ n);
    }else if(n==0){
        System.out.println("Impossible");
    }
    else{
        System.out.println(Math.max(n,m) +" "+(n+m-1));
    }

    }
}

import java.io.*;
import java.util.*;

public class A190
{

public static void main(String args[])
{

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

String s="";

try
{
s=br.readLine();
}
catch(IOException io)
{
System.out.println("error");
}

StringTokenizer s1=new StringTokenizer(s);
long n=Long.parseLong(s1.nextToken());
long m=Long.parseLong(s1.nextToken());

long min=0,max=0;

if(n==0 && m!=0)
{
System.out.println("Impossible");
}

else
{
if(m!=0)
{
max=n+m-1;
}
else
max=n;

if(n>=m)
{
min=n;
}

else if(m>n)
{min=m;
}
System.out.println(min+" "+max);

}

}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author zodiacLeo
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int g = in.nextInt();
            int c = in.nextInt();

            if (g == 0 && c != 0)
            {
                out.println("Impossible");
                return;
            }

            int min = Math.max(0, c - g) + g;
            int max = Math.max(0, g - 1);
            if (g >= 1)
            {
                max += Math.max(1, c);
            }

            out.println(min + " " + max);
        }

    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {

    public static int[] x = {0, 1, 0, -1, 1, -1, 1, -1};
    public static int[] y = {1, 0, -1, 0, 1, 1, -1, -1};
    public static double[][][][] dp;

    public static void main(String[] args) {
        try {
            Scanner in = new Scanner();
            // PrintWriter out = new PrintWriter(new FileOutputStream(new File("vans.out")));
            PrintWriter out = new PrintWriter(System.out);
            int n = in.nextInt();
            int m = in.nextInt();
            if (n == 0 && m > 0) {
                out.println("Impossible");
            } else {

                int min = n + (m - n > 0 ? (m - n) : 0);
                int max = n + (m - 1 > 0 ? m - 1 : 0);
                out.println(min + " " + max);
            }
            out.close();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    static double dist(Point a, Point b) {
        long total = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
        return Math.sqrt(total);
    }

    static class Point {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;

        }
    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        void update(int index, int val) {
            // System.out.println("UPDATE INDEX " + index);
            while (index < data.length) {
                data[index] += val;
                index += index & (-index);

                //    System.out.println("NEXT " +index);
            }
        }

        int get(int index) {
            //  System.out.println("GET INDEX " + index);
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= index & (-index);
                // System.out.println("BACK " + index);
            }
            return result;
        }
    }

    static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        } else {
            return gcd(b, a % b);
        }
    }

    static int pow(int a, int b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        int val = pow(a, b / 2);
        if (b % 2 == 0) {

            return val * val;
        } else {
            return val * val * a;
        }
    }

//    static Point intersect(Point a, Point b, Point c) {
//        double D = cross(a, b);
//        if (D != 0) {
//            return new Point(cross(c, b) / D, cross(a, c) / D);
//        }
//        return null;
//    }
//
//    static Point convert(Point a, double angle) {
//        double x = a.x * cos(angle) - a.y * sin(angle);
//        double y = a.x * sin(angle) + a.y * cos(angle);
//        return new Point(x, y);
//    }
//    static Point minus(Point a, Point b) {
//        return new Point(a.x - b.x, a.y - b.y);
//    }
//
//    static Point add(Point a, Point b) {
//        return new Point(a.x + b.x, a.y + b.y);
//    }
//
//    static double cross(Point a, Point b) {
//        return a.x * b.y - a.y * b.x;
//
//
//    }
//
//    static class Point {
//
//        int x, y;
//
//        Point(int x, int y) {
//            this.x = x;
//            this.y = y;
//        }
//
//        @Override
//        public String toString() {
//            return "Point: " + x + " " + y;
//        }
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            //System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new FileReader(new File("vans.in")));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.util.*;

public class VasyaBus
{

	public static void main( String[] args )
	{
		Scanner scan = new Scanner( System.in );
		int n = scan.nextInt(), m = scan.nextInt();

		if ( n == 0 && m != 0 )
		{
			System.out.printf( "%s", "Impossible" );
		}
		else
		{
			System.out.printf( "%d %d", Math.max( n, m ), n + Math.max( m - 1, 0 ) );
		}

	}

}

/**
 * @(#)codeforce190a.java
 *
 *
 * @author
 * @version 1.00 2015/8/25
 */

import java.util.*;
public class codeforce190a {

    public static void main(String[]args)
    {
     Scanner s=new Scanner(System.in);
     int n=s.nextInt();
     int m=s.nextInt();
     if(n>=0&&m>=0&&n<=100000&&m<=100000)
     {
      if(n==0&&m==0)
      {
      	System.out.println(0);
      	System.out.print(0);
      }
      else if(n==0&&m!=0)
      {
      	System.out.print("Impossible");
      }
      else if(m==0&&n!=0)
      {
      	System.out.println(n);
      	System.out.print(n);
      }
      else if(n>m)
      {
      	System.out.println(n);
      	System.out.print(m+n-1);
      }
      else if(n<=m)
      {
      	System.out.println(m);
      	System.out.print(m+n-1);
      }
     }
    }

}

import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Scanner;

public class VasyaandtheBus {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		while (in.hasNext()) {
			int a = in.nextInt();
			int b = in.nextInt();
			if(a==0&&b==0){
				out.println(0+" "+0);
			}

			else	if (a == 0) {
				out.println("Impossible");
			} else {
				int t = b - a;
				if (t < 0) {
					t = 0;
				}
				int min = a + t;
				int k = b - 1;
				if (k < 0) {
					k = 0;
				}
				int max = a + k;
				out.println(min+" "+max);
			}
			out.close();
		}
	}
}

/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000 * 1000 * 1000 + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();
        if (m == 0) {
            outln(n + " " + n);
            return;
        }

        if (n == 0) {
            outln("Impossible");
            return;
        }

        outln(findMin(n, m) + " " + findMax(n, m));
    }

    int findMin(int n, int m) {
        int res = n + m;
        res -= Math.min(n, m);
        return res;
    }

    int findMax(int n, int m) {
        return n + m - 1;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        System.out.format("%.9f%n", val);
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}

	import java.awt.image.BufferedImage;
	import java.io.BufferedReader;
	import java.io.InputStreamReader;
	import java.util.StringTokenizer;

	public class Main {

		static long N,M;
		public static void main(String[] args) {
			BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
			String str;

			try{
				str = read.readLine();
				StringTokenizer token = new StringTokenizer(str);
				N = Long.parseLong( token.nextToken() );
				M = Long.parseLong( token.nextToken() );

				if( N == 0 && M > 0 ) System.out.println("Impossible");
				else if( N == 0 && M == 0 )System.out.println(0 + " " + 0);
				else if( M <= N ){
					long mn = 0, mx = 0;
					mn = N;
					mx = N;
					if( M > 0 ) mx += (M-1);
					System.out.println( mn + " " + mx );
				}
				else{
					long mn = 0, mx = 0;
					mn = N + (M-N);
					mx = N + M-1;

					System.out.println( mn + " " + mx );
				}

			}catch( Exception e ){

			}

		}

	}
	/*
	3 5
	..+.#
	#+..+
	+.#+.

	 * */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) throws IOException
	{
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt(), m = sc.nextInt();
		if(n == 0)
			out.println(m == 0 ? "0 0" : "Impossible");
		else
			out.printf("%d %d\n", Math.max(n, m), n + (m > 0 ? m - 1 : 0));
		out.flush();
		out.close();

	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class Bus {
    public static void main(String[] args) throws IOException
    {
        InputStreamReader stream=new InputStreamReader(System.in);
    BufferedReader scan=new BufferedReader(stream);
     String cadena = scan.readLine();
     StringTokenizer tokens = new StringTokenizer(cadena, " ");
     int[] num = new int[tokens.countTokens()];
     for (int i = 0; i < num.length; i++) {
     num[i] = Integer.parseInt(tokens.nextToken());
     }

     {
     if(num[0]==0&&num[1]!=0)
    {
    System.out.println("Impossible");
    }
     else
         if(num[1]==0&&num[0]==0)
     {
            System.out.println("0"+" "+"0");
     }
    else
    {
    if(num[1]==0)
    {
        System.out.println(num[0]+" "+num[0]);
    }

    else
    {if (num[0]<num[1])
     {

         System.out.println(num[1]+" "+(num[1]+(num[0]-1)));
     }
     else
     {

         System.out.println(num[0]+" "+((num[0]+num[1])-1));
     }

    }
    }

    }}}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Solution {

	void solve() throws IOException {
		int n = nextInt(), m = nextInt();
		if (n == 0) {
			System.out.println((m == 0) ? "0 0" : "Impossible");
			return;
		}
		System.out.print(n + m - Math.min(n, m));
		System.out.print(" ");
		System.out.println(n + m - ((m == 0) ? 0 : 1));

	}

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String s = br.readLine();
			if (s == null) {
				return "-1";
			}
			st = new StringTokenizer(s);
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	void run() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		solve();
		br.close();
	}

	public static void main(String[] args) throws IOException {
		new Solution().run();
	}

}

import java.io.*;
public class vnb
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n,m;

int min=0,max=0;

String z[]=br.readLine().split(" ");

n=Integer.parseInt(z[0]);
m=Integer.parseInt(z[1]);

if(m>=n)
{
min=m;
}

else
{
min=n;
}

if(m==0)
{
max=n;
}
else
{
max=(m+n)-1;
}

if(n==0&&m==0)
{
System.out.println("0 0");
}
else if(n==0&&m!=0)
{
System.out.println("Impossible");
}
else
{
System.out.println(min+" "+max);
}

}
}

import java.util.*;
public class Main {
	public static void main(String[]args){
		Scanner input=new Scanner(System.in);
		while(input.hasNext()){
			int grow=input.nextInt();
			int children=input.nextInt();
			int min=0,max=0;
			if(grow==0&&children!=0){
				System.out.print("Impossible");
				continue;
			}
			if(grow>=children)min=grow;
			else min=grow+children-grow;
			if(children==0)max=grow;
			else max=children+grow-1;
			System.out.print(min+" "+max);
		}
	}
}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.TreeSet;

import java.math.BigInteger;

public class Main {

	public static boolean debug = false;

	public static Reader in = new Reader();
	public static Writer out = new Writer();

	public static void main(String[] args) {

		long n = in.nextLong();
		long m = in.nextLong();

		if(n==0 && m>0) {
			out.println("Impossible");
		} else {
			long total = n;

			long tempM = m;

			if(tempM>=n) {
				tempM -= n;
			} else {
				tempM = 0;
			}

			total += tempM;

			out.print(total+" ");

			total = n;

			if(m>0) {
				total += (m-1);
			}

			out.println(total);

		}
		out.close();
	}

}

class Writer {

	private BufferedWriter output;

	public Writer() {
		output = new BufferedWriter(new OutputStreamWriter(System.out));
	}

	public Writer(String s) {
		try {
			output = new BufferedWriter(new FileWriter(s));
		} catch(Exception ex) { ex.printStackTrace(); System.exit(0);}
	}

	public void println() {
		try {
			output.append("\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void print(Object o) {
		try {
			output.append(o.toString());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void println(Object o) {
		try {
			output.append(o.toString()+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printf(String format, Object... args) {
		try {
			output.append(String.format(format, args));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printfln(String format, Object... args) {
		try {
			output.append(String.format(format, args)+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void flush() {
		try {
			output.flush();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void close() {
		try {
			output.close();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
}

class Reader {
	private BufferedReader input;
	private StringTokenizer line = new StringTokenizer("");

	public Reader() {
		input = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String s) {
		try {
			input = new BufferedReader(new FileReader(s));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void fill() {
		try {
			if(!line.hasMoreTokens()) line = new StringTokenizer(input.readLine());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public double nextDouble() {
		fill();
		return Double.parseDouble(line.nextToken());
	}

	public String nextWord() {
		fill();
		return line.nextToken();
	}

	public int nextInt() {
		fill();
		return Integer.parseInt(line.nextToken());
	}

	public long nextLong() {
		fill();
		return Long.parseLong(line.nextToken());
	}

	public double readDouble() {
		double d = 0;
		try {
			d = Double.parseDouble(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return d;
	}

	public int readInt() {
		int i = 0;
		try {
			i = Integer.parseInt(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return i;
	}

	public int[] readInts(int n) {
		int[] a = new int[n];
		for(int i=0; i<n; i++)
			a[i] = nextInt();
		return a;
	}

	public void fillInts(int[] a) {
		for(int i=0; i<a.length; i++)
			a[i] = nextInt();
	}

	public long readLong() {
		long l = 0;
		try {
			l = Long.parseLong(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return l;
	}

	public String readLine() {
		String s = "";
		try {
			s = input.readLine();
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return s;
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String a[] = in.readLine().split(" ");
        int ad = Integer.valueOf(a[0]), ni = Integer.valueOf(a[1]);
        if (ad > 0 || ni==0) {
            System.out.print((ni > ad ? ni : ad) + " ");
            System.out.println(ni > 0 ? ad + ni - 1 : ad);
        } else {
            System.out.println("Impossible");
        }
    }
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;
        Solver s = new Solver();
        for (int i = 1; i <= t; i++) {
            s.solve(i, in, out);
        }
        out.close();
    }

}

class Solver {

    void solve(int test, InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0 && m != 0) {
            out.println("Impossible");
            return;
        }
        int min = n + (m - n > 0 ? m - n : 0);
        int max = n +  (m - 1 > 0 ? m - 1 : 0);
        out.println(min + " " + max);
    }
}

class InputReader {
    BufferedReader br;
    StringTokenizer st;

    public InputReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

import java.util.Scanner;

public class pbA {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		int n = input.nextInt();
		int m = input.nextInt();

		if(n<=0 && m>0 || n<0 || m<0) System.out.println("Impossible");
		else System.out.println(getMin(n, m)+" "+getMax(n, m));

	}

	static int getMin(int n, int m) {

		int sum = n + (m - n>0? m-n:0);
		return sum;
	}

	static int getMax(int n,int m){

		int sum = n+ (m-1>0? m-1:0);
		return sum;
	}
}

import java.util.Scanner;
public class Javabasics {
    public static void main(String[] args){
        Scanner enter = new Scanner(System.in);
        int n = enter.nextInt(), m = enter.nextInt();
        if(n == 0 && m == 0)
            System.out.println(0 + " " + 0);
        else if(n == 0)
            System.out.println("Impossible");
        else if(m == 0)
            System.out.println(n + " " + n);
        else if(m <= n)
            System.out.println(n + " " + (n+m-1));
        else
            System.out.println(n+n*(m/n-1)+m%n + " " + (n+m-1));
    }
}

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.io.*;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {
		// Scanner read = new Scanner(new FileInputStream(new
		// File("input.txt")));
		// PrintWriter out = new PrintWriter(new File("output.txt"));
		Scanner read = new Scanner(System.in);
		int n = read.nextInt(), m = read.nextInt(), p = m;
		if(n == 0 && m != 0)
			System.out.println("Impossible");
		else if(m == 0)
			System.out.println(n + " " + n);

		else{
			if(m >= n){
				p -= n;
				System.out.print(n + p + " ");
			}
			else{
				System.out.print(n + " ");
			}
			System.out.print(n + m - 1);
		}

	}
}

import java.util.Scanner;

public class Bus {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        if(n == 0 && m != 0) {
            System.out.println("Impossible");
            return;
        }
        int minimum = Math.max(n, m);
        int maximum = Math.max(n, m+n-1);
        System.out.println(minimum + " " + maximum);
    }

}

// created by: 17.04.12 10:13 programmer: thinker

import java.io.BufferedInputStream;
import java.util.Scanner;

public class A
{
    public A()
    {
        Scanner sc = new Scanner(new BufferedInputStream(System.in));
        long n = sc.nextLong(), m = sc.nextLong();
        if(n == 0 && m != 0)
        {
            System.out.println("Impossible");
            return;
        }
        if(m == 0)
            System.out.println((n)+" "+(n));
        else if(m > n)
            System.out.println((n+(m-n))+" "+(n+(m-1)));
        else
            System.out.println((n)+" "+(n+(m-1)));
    }

    public static void main(String[] args)
    {
        new A();
    }
}

import java.util.*;
// warm-up
public class VasyaAndTheBus {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),c=sc.nextInt(),min=0,max=0;
		if (a==0 && c>0) System.out.println("Impossible");
		else {
			min=a+((c>a) ? c-a : 0);
			max=a+((c>0) ? c-1 : 0);
			System.out.println(min+" "+max);
		}
		sc.close();
	}

	public static void main(String args[]) {
		solve();
	}

}

import static java.lang.Double.parseDouble;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import static java.util.Arrays.fill;

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import java.text.*;

public class Main {
	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;

	final static double EPS = 1e-9;
	final static int MOD = 1000000009;

	static void solve() throws Exception {
		int n = nextInt();
		int m = nextInt();
		if (n == 0 && m != 0) {
			out.println("Impossible");
		} else {
			int res1 = n + Math.max(m-n, 0);
			int res2 = n + Math.max(m-1, 0);
			out.println(res1 + " " + res2);
		}
	}

	static int sqr(int x) {
		return x*x;
	}

	static int nextInt() throws IOException {
		return parseInt(next());
	}

	static long nextLong() throws IOException {
		return parseLong(next());
	}

	static double nextDouble() throws IOException {
		return parseDouble(next());
	}

	static BigInteger nextBigInteger() throws IOException {
		return new BigInteger(next());
	}

	static String next() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public static void main(String args[]) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}

import java.util.*;
public class A {
	Scanner sc = new Scanner(System.in);
	void doIt()
	{
		int a = sc.nextInt();
		int c = sc.nextInt();
		if(a == 0 ) {
			if(c == 0) System.out.println(0 + " " + 0);
			else
			System.out.println("Impossible");
		} else {
			// 一人の大人にすべての子供
			int ans1 = (a-1)+c;
			if(c == 0) ans1 = a; // 子供がいない特別なケース
			// 大人 >= 子供 子供と大人は1対1
			// 大人 < 子供 子供は大人の誰かにマッピング
			int ans2 = Math.max(a, c);
			System.out.println(ans2 + " " + ans1);
		}
	}
	public static void main(String[] args) {
		new A().doIt();
	}

}

import java.util.Scanner;

public class A {

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0 && m>0) {
            System.out.println("Impossible");
        } else {
            int max = n + Math.max(0, m - 1);
            int min = n + Math.max(0, m - n);
            System.out.println(min + " " + max);
        }
    }
}

import java.util.Scanner;

public class A_Vasya_and_the_Bus {
public static void main(String[] args) {
	Scanner sc= new Scanner(System.in);
	int n=sc.nextInt();
	int m=sc.nextInt();
	if(n==1){
		System.out.println(m+" "+m);return;
	}
	if(n==0){System.out.println("Impossible");return;}
       int max=n+m-1;
       int min=0;
       if(n>=m)
    	min=n;
       else
    	min=(n-1)+m-1;
	System.out.println(min+" "+max);

}
}

import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.*;

public class CF120A {

	private CF120A() { }
	private static Scanner scanner;

	/**
	  * Reads the next token from standard input, parses it as an integer, and returns the integer value.
	  * @return the integer value of standard input
	  * @throws InputMismatchException if the token cannot be parsed as an <tt>integer</tt>
	  */
	public static int readInt() {
		return scanner.nextInt();
	}

	/**
	  * Reads the next token from standard input, parses it as a double, and returns the double value.
	  * @return the double value of standard input
	  * @throws InputMismatchException if the token cannot be parsed as an <tt>double</tt>
	  */
	public static double readDouble() {
		return scanner.nextDouble();
	}

	public void solve() {
		scanner = new Scanner(System.in);
		int n = readInt();
		int m = readInt();
		int max = 0, min = 0;
		if(n == 0) {
			System.out.println("Impossible");
			return;
		}else {
			int a = m - n;
			if (a<0) {
				min = n;
			}else
				min = n + (m-n);
			if(m>0) {
				max = n + (m-1);
			}else
				max = n;
		}

		System.out.println(min+" "+ max);
	}

	public static void main(String[] args) {
		new CF120A().solve();
	}

}

import java.util.*;
public class Main
{
    public static void main(String[] args)
    {
        TaskA solver = new TaskA();
        TaskA.solve();
    }
}
class TaskA
{
    public static void solve()
    {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        if(n == 0)
            System.out.println("Impossible");
        else
        {
            int maxSum = 0, minSum = 0;
            System.out.println(Math.max(m,n) + " " + Math.max(n,m+n-1));
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (N == 0)
			System.out.println("Impossible");
		else if (M == 0)
			System.out.println(N + " " + N);
		else {
			int min = (M / N) * N + M % N;
			int max = (N - 1) + M;
			System.out.println(min + " " + max);
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
}

import java.io.*;
import java.util.*;

public class Main {
    public static void solve() {
        // Implementation goes here
        int n = readInt();
        int m = readInt();
        // if(n == 0 && m == 0) {
            // outStream.println(0);
        // } else if(n == 0 && m != 0) {
        if(n == 0) {
            outStream.println("Impossible");
        } else {
            int minimum = n > m ? n : m;
            int maximum = m == 0 ? n : n + m - 1;
            outStream.println(minimum + " " + maximum);
        }
    }

    static BufferedReader reader = null;
    static PrintStream outStream = null;
    static StringTokenizer tokenizer = null;

    public static String getLine() {
        String str = null;
        try {
            str = reader.readLine();
        } catch (IOException e) {}

        return str;
    }

    public static void main(String[] args) {
        outStream = new PrintStream(System.out);
        reader = new BufferedReader(new InputStreamReader(System.in));

        solve();

        outStream.close();
    }

    public  static String nextToken() {
        try {
            if(tokenizer == null || !tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(reader.readLine());
        } catch(IOException e) {}
        return tokenizer.nextToken();
    }

    public static int readInt() {
        return Integer.parseInt(nextToken());
    }

    public static double readDouble() {
        return Double.parseDouble(nextToken());
    }

    public static long readLong() {
        return Long.parseLong(nextToken());
    }
}

import java.util.Scanner;

public class CF_190A
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);

        int n, m;
        n = scan.nextInt();
        m = scan.nextInt();

        // Max cost occurs when one parent has all the children, and the rest of the parents are solo riders.
        int max = n + (m - 1);
        // Min cost occurs when every available parent has its own child. Thus, the cost would be (n + m) - n = m.
        int min = m;

        // Impossible when there are no adults, or if a negative cost occurs.
        if(0 == n || 0 > min || 0 > max)
        {
            System.out.println("Impossible");
        }
        else
        {
            System.out.println(min + " " + max);
        }
    }
}

import java.util.*;
 public class A{
     public static void main(String []args){
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = sc.nextInt();
         if(n == 0){
             System.out.println("Impossible");

         }else{
             int k = m - n;
             if(m == 0)
                m = 1;
             if(k < 0) k = 0;
                System.out.println((n+k) + " " + (n + m - 1));
         }
     }
 }

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.IOException;

public class Main
{

   public static void main(String[]arg) throws IOException
   {
        StringBuilder sol = new StringBuilder();
        StringTokenizer tokens;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line = in.readLine();
        tokens = new StringTokenizer(line);

          int n = Integer.parseInt(tokens.nextToken());
          int m = Integer.parseInt(tokens.nextToken());
          int min = m;
          int max = n + m - 1;
          if(n == 0)
            sol.append("Impossible");
          else
           if(m != 0)
             if(n <= m)
               sol.append(min).append(" ").append(max);
             else
               sol.append(n).append(" ").append(n);
           else
              sol.append(n).append(" ").append(n);
        System.out.print(sol);
   }
}

import java.util.Scanner;
public class Javabasics {
    public static void main(String[] args){
        Scanner enter = new Scanner(System.in);
        int n = enter.nextInt(), m = enter.nextInt();
        if(n == 0)
            System.out.println("Impossible");
        else if(m == 0)
            System.out.println(n + " " + n);
        else
            System.out.println((n + n*((m/n)-1) + m%n) + " " + (n+m-1));
    }
}

import java.util.Scanner;

public class Fare{
	public static int min(int n, int m){
		int child = m-n >= 0 ? m-n : 0;
		return n+child;
	}

	public static int max(int n, int m){
		if( m == 0 ){
			return n;
		}
		return n+m-1;
	}

	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		if( n <= 0 ){
			System.out.println("Impossible");
		} else {
			System.out.println(min(n,m) + " " + max(n,m));
		}
	}
}

import java.util.*;

public class VasyaAndTheBus {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int m = in.nextInt();

        if (n == 0) {
            System.out.println("Impossible");
        } else {
            int min = n + Math.max(0, m - n);
            int max = n + Math.max(0, m - 1);
            System.out.println(min + " " + max);
        }

        in.close();
        System.exit(0);
    }
}

import java.util.Scanner;

public class A implements Runnable {

    public static void main(String args[]) {
        (new Thread(new A())).start();
    }

    public void run() {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0) {
            System.out.println("Impossible");
        } else if (m == 0) {
            System.out.println(n);
        } else {
            int max = m + n - 1;
            int min = n + Math.max(0, m - n);
            System.out.println(min + " " + max);
        }
    }
}

import java.io.*;
import java.util.*;

public class Main {
    public static void solve() {
        // Implementation goes here
        int n = readInt();
        int m = readInt();
        if(n == 0 && m == 0) {
            outStream.println(0);
        } else if(n == 0 && m != 0) {
        // if(n == 0) {
            outStream.println("Impossible");
        } else {
            int minimum = n > m ? n : m;
            int maximum = m == 0 ? n : n + m - 1;
            outStream.println(minimum + " " + maximum);
        }
    }

    static BufferedReader reader = null;
    static PrintStream outStream = null;
    static StringTokenizer tokenizer = null;

    public static String getLine() {
        String str = null;
        try {
            str = reader.readLine();
        } catch (IOException e) {}

        return str;
    }

    public static void main(String[] args) {
        outStream = new PrintStream(System.out);
        reader = new BufferedReader(new InputStreamReader(System.in));

        solve();

        outStream.close();
    }

    public  static String nextToken() {
        try {
            if(tokenizer == null || !tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(reader.readLine());
        } catch(IOException e) {}
        return tokenizer.nextToken();
    }

    public static int readInt() {
        return Integer.parseInt(nextToken());
    }

    public static double readDouble() {
        return Double.parseDouble(nextToken());
    }

    public static long readLong() {
        return Long.parseLong(nextToken());
    }
}

import java.util.Scanner;

public class MainS {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        long m = in.nextLong();
        long min = 0;
        long max = 0;
        if(n==0){
        	System.out.println("Impossible");
        }else if (m >= n){
        	min = m ;
        	max =(m-1)+ n;
        	System.out.println(min+" "+max);
        }else if (n > m){
        	min = n;
        	max = n;
        	System.out.println(min+" "+max);
        }

//        }else if(m==n){
//        	min = n + m%n;
//        	max =(m-1)+ n;
//        	System.out.println(min+" "+max);
//        }else if(m>n){
//        	min = n + n%m;
//        	max =(m-1)+ n;
//        	System.out.println(min+" "+max);
//        }else if(n>m){
//        	min = n;
//        	max = n + (m-1);
//        	System.out.println(min+" "+max);
//        }
    }

}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner theIn=new Scanner(System.in);
		int n=theIn.nextInt();
		int m=theIn.nextInt();
		if (n==0) System.out.println("Impossible"); else {
			int min=n+(m-n);
			int max=n+m-1;
			System.out.println(min+" "+max);
		}
	}
}

import java.io.*;
import java.util.*;
import java.lang.Math.*;
public class bus_fare
{
     public static void main(String args[])throws Exception
     {
         Scanner in=new Scanner(System.in);
         PrintWriter pw = new PrintWriter(System.out);
         int n=in.nextInt();
         int m=in.nextInt();
         if(n==0 && m!=0)
         pw.println("Impossible");
         else
         {
             int min=0,max=0;
             if(n>=m)
             {
                 min=n;
                 max=n+m-1;
                }
             else
             {
                 min=m;
                 max=n+m-1;
                }
             pw.println(min+" "+max);

            }
          pw.flush();
     }
}

import java.io.BufferedInputStream;
import java.util.*;
import static java.lang.Math.*;

public class C190A {

	public void solve() throws Exception {
		int n = nextInt();
		int m = nextInt();
		if (n == 0) {
			if (m == 0) {
				println(0,0);
			} else {
				println("Impossible");
			}
		} else {
			println(max(n,m), m + n - 1);
		}
	}

	// ------------------------------------------------------

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	void print(Object... os) {
		if (os != null && os.length > 0)
			System.out.print(os[0].toString());
		for (int i = 1; i < os.length; ++i)
			System.out.print(" " + os[i].toString());
	}

	void println(Object... os) {
		print(os);
		System.out.println();
	}

	BufferedInputStream bis = new BufferedInputStream(System.in);

	String nextWord() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c > ' ') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	String nextLine() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c != '\n' && c != '\r') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextWord());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextWord());
	}

	public static void main(String[] args) throws Exception {
		new C190A().solve();
	}
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
      int n = input.nextInt();
      int m = input.nextInt();
      if(n==0&&m==0)
      {
           System.out.println(n+" "+m);
           return;
      }

      else if(n==0)
      {
          System.out.println("Impossible");
          return;
      }
      else if(m==0||m==1)
      {
          System.out.println(n+" "+n);
          return;
      }

        System.out.print(((n*(m/n))+m%n)+" ");
        System.out.println(m+(n-1));

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws IOException {
		Reader kb = new Reader(System.in);
		int aa = kb.nextInt();
		int bb = kb.nextInt();
		if(aa<=0){
			System.out.println("Impossible");
			return;
		}
		int min = 0;
		int max = 0;
		int a = aa;
		int b = bb;
		for (int i = 0; i < a - 1; i++) {
			if (b > 0)
				b--;
			min++;
		}
		min++;
		for (int i = 0; i < b - 1; i++)
			min++;

		max++;
		for (int i = 0; i < bb - 1; i++)
			max++;

		for (int i = 0; i < a - 1; i++)
			max++;

		System.out.println(min + " " + max);

	}

}

class Reader {
	private BufferedReader x;
	private StringTokenizer st;

	public Reader(InputStream in) {
		x = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String nextString() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(x.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextString());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextString());
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;

 public class TestClass1 {

  public static void main(String[] args) throws  Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String []s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int m  =Integer.parseInt(s[1]);

        if(n == 0)
            System.out.println("Impossible");
        else{
            System.out.println(Math.abs(n-m)+n + " "+(n+m-1));
        }
  }
}

import java.util.*;

public class cf190a {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt(), b = in.nextInt();
		if(a==0) System.out.println("Impossible");
		else System.out.println(Math.max(a, b) + " " + (a+b-1));
	}
}

import java.io.*;
import java.util.*;

public class TaskA implements Runnable {
	BufferedReader in;
	PrintWriter out;
	StringTokenizer stok;

	String nextToken() {
		try {
			while (stok == null || !stok.hasMoreTokens()) {
				stok = new StringTokenizer(in.readLine());
			}
		} catch (Exception e) {
			return null;
		}
		return stok.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	void solve() throws IOException {
		int n = nextInt(), m = nextInt();
		if (n == 0) {
			out.println("Impossible");
		} else {
			out.printf("%d %d", Math.max(n, m), n + m - 1);
		}
	}

	public void run() {
		try {
			try {
				in = new BufferedReader(new FileReader("taska.in"));
				out = new PrintWriter("taska.out");
			} catch (Exception e1) {
				try {
					in = new BufferedReader(new FileReader("input.txt"));
					out = new PrintWriter("output.txt");
				} catch (Exception e2) {
					in = new BufferedReader(new InputStreamReader(System.in));
					out = new PrintWriter(System.out);
				}
			}
			solve();
			in.close();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public static void main(String[] args) throws IOException {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {
		}
		new Thread(new TaskA()).start();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.Vector;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO Auto-generated method stub
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out=new PrintWriter(System.out);
        //BufferedReader in = new BufferedReader(new FileReader("input.txt"));
        //PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
        String[] input=in.readLine().split(" ");
        int n=Integer.parseInt(input[0]);
        int m=Integer.parseInt(input[1]);
        if(n==0){
            out.println("Impossible");
        }
        if(m==0){
            out.println(n+" "+n);
        }
        else{
            int max=n+m-1;
            int min=Math.max(n, m);
            out.println(min+" "+max);
        }
        out.close();
    }
}

import java.io.*;
import java.security.SecureRandom;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	public void solve() throws Exception {
		int n = sc.nextInt();
		int m = sc.nextInt();
		if (n == 0) {
			out.println("Impossible");
			return;
		}
		int maxAns = n + (m - 1);
		int minAns = n + m - min(n, m);
		out.println(minAns + " " + maxAns);
    }

    /*--------------------------------------------------------------*/

    static String filename = "";
    static boolean fromFile = false;

    BufferedReader in;
    PrintWriter out;
    FastScanner sc;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 1 << 25).start();
    }

    public void run() {
        try {
            init();
            solve();
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            out.close();
        }
    }

    void init() throws Exception {
    	if (fromFile) {
    		in = new BufferedReader(new FileReader(filename+".in"));
        	out = new PrintWriter(new FileWriter(filename+".out"));
    	} else {
    		in = new BufferedReader(new InputStreamReader(System.in));
        	out = new PrintWriter(System.out);
    	}
        sc = new FastScanner(in);
    }
}

class FastScanner {

    BufferedReader reader;
    StringTokenizer strTok;

    public FastScanner(BufferedReader reader) {
        this.reader = reader;
    }

    public String nextToken() throws IOException {
        while (strTok == null || !strTok.hasMoreTokens()) {
            strTok = new StringTokenizer(reader.readLine());
        }

        return strTok.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public BigInteger nextBigInteger() throws IOException {
    	return new BigInteger(nextToken());
    }

    public BigDecimal nextBigDecimal() throws IOException {
    	return new BigDecimal(nextToken());
    }
}

import java.text.DecimalFormat;
import java.util.Scanner;

public class B190 {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int adult = s.nextInt(), children = s.nextInt();
		if(adult==0) {
			System.out.println("Impossible");
			return;
		}
		long max = children+adult-1, min=0;
		if(adult >= children) {
			min=adult;
		} else {
			min+=adult; children-=adult;
			min+=children;
		}

		System.out.println(min + " " + max);
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Ivanov A.K.
 */
public class A {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter pw;

    void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();

        if (n == 0)  { System.out.println("Impossible"); return; }

        if (n >= m) {
            System.out.println(n + " " + (m + n -1) );
        } else
            System.out.println(m + " " + (m + n -1) );
    }

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(System.out);
            solve();
            pw.close();
            reader.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new A().run();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
//
//    long nextLong() throws IOException {
//        return Long.parseLong(nextToken());
//    }
//
//    double nextDouble() throws IOException {
//        return Double.parseDouble(nextToken());
//    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}

import java.io.*;
import java.util.*;

public class VasyaAndTheBus {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String args[]) throws IOException {

        FastReader scan = new FastReader();
        int grownUps = scan.nextInt(), children = scan.nextInt();
        int max = grownUps + children - 1;
        int min = 0;
        if (grownUps == 0) {
            System.out.println("Impossible");
        } else if (children == 0) {
            max = grownUps;
            min = grownUps;
            System.out.print(min + " " + max);
        } else if (children / grownUps == 0 || children / grownUps == 1) {
            min = grownUps;
            System.out.print(min + " " + max);
        } else {
            min = children;
            System.out.print(min + " " + max);
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF190A {
    public static void main(String[] args) {
        FastReader input = new FastReader();
        PrintWriter pw = new PrintWriter(System.out);

        int n = input.nextInt();
        int m = input.nextInt();

        if(n == 0){
            pw.println("Impossible");
        }
        else{
            long ans = 0;
            ans += n;
            if(m > n){
                ans += (m - n);
            }
            long min = ans;

            ans = 0;
            ans += n;
            ans += (m-1);
            long max = ans;

            pw.println(min + " " + max);
        }

        // ****If sorting is required, use ArrayList
        pw.flush();
        pw.close();
    }
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int min=0;
        int max=0;
        int n=sc.nextInt();
        int m=sc.nextInt();
        if(n==0)
            System.out.println("Impossible");
        else{
        if(m>=n&& n!=0){
            min=m;
            max=m+n-1;
            }
            else{
            min=n;
            max=m+n-1;
            }
         System.out.println(min+" "+max);
        }

        }
    }

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	static int []arreglo;
	 public static void main(String []args)throws IOException
	 {
		 BufferedReader sa= new BufferedReader(new InputStreamReader(System.in));
		 PrintWriter res1=new PrintWriter(new OutputStreamWriter(System.out));
		 StringTokenizer res=new StringTokenizer(sa.readLine());

		 int a=Integer.parseInt(res.nextToken());
		 int b=Integer.parseInt(res.nextToken());

		 if(a>1){
			if(a>b){
				if(b==0){
					int aux2=a;
					res1.print(aux2+" "+aux2);
				}
				else
		 {int aux2=a;
		 int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);}

			}
			else{
				int aux2=a+(b-a);
				int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);
			}

		}
		 else
		 {
			 if(a==0)
			 {
				 res1.print("Impossible");
			 }
			 if(a==1)
			 {
				/* if(b==1)
					 {
					   int aux1=1+1;
					   res1.print(aux1+" "+aux1);
					 }
				 else{
					 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);*/
                 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);
			 }

		 }
		 res1.flush();
	 }
	 }

/*
 *
 * @Author  Ajudiya_13(Bhargav Girdharbhai Ajudiya)
 * Dhirubhai Ambani Institute of Information And Communication Technology
 *
 */

import java.util.*;
import java.io.*;
import java.lang.*;

public class Code170
{

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static long mod = 1000000007;
	public static int d;
	public static int p;
	public static int q;

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static void extendedEuclid(int A,int B)
	{
		if(B==0)
		{
			d = A;
			p = 1 ;
			q = 0;
		}
		else
		{
			extendedEuclid(B, A%B);
			int temp = p;
			p = q;
			q = temp - (A/B)*q;
		}
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}

	public static void main(String[] args)
	{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int n = in.nextInt();
		int m = in.nextInt();

		if(n==0)
			pw.print("Impossible");
		else
		{
			int min = 0;
			int max = 0;
			if(n>=m)
				min = n;

			else
				min = m;

			if(m>0)
				max = m+n-1;
			else
				max = m+n;
			pw.println(min + " " + max);
		}

		pw.flush();
		pw.close();
	}
}

//Codeforces 120 A
//16/05/2012 10:01:03
import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
import java.awt.geom.*;
import static java.lang.System.out;
import static java.util.Collections.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.math.BigDecimal.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Double.*;
import static java.lang.Character.*;

public class Main
{
	public static void main(String[] args) throws Exception
	{
		Main prog = new Main();
		prog.run();
	}
	void run() throws Exception
	{
		Parser in = new Parser();
		int a = in.nextInteger();
		int n = in.nextInteger();
		if(a==0 && n==0)
			out.println("0 0");
		else if(a!=0 && n==0)
			out.println(a+" "+a);
		else if(a==0 && n!=0)
			out.println("Impossible");
		else
		{
			int maximo = n + a - 1;
			int minimo = a*(n/a)+n%a;
			out.println(minimo + " " + maximo);
		}
	}
}

class Parser
{
	BufferedReader	buf;
	StringTokenizer	tok;
	Parser() throws Exception
	{
		//buf = new BufferedReader(new InputStreamReader(new FileInputStream("in.txt")));
		buf = new BufferedReader(new InputStreamReader(System.in));
		tok = new StringTokenizer("");
	}
	String nextString() throws Exception
	{
		while(!tok.hasMoreTokens())
		{
			String s = buf.readLine();
			if (s != null)
				tok = new StringTokenizer(s);
			else
				return null;
		}
		return tok.nextToken();
	}
	String nextLine() throws Exception
	{
		tok = new StringTokenizer("");
		return buf.readLine();
	}
	Integer nextInteger() throws Exception
	{
		return nextInteger(10);
	}
	Integer nextInteger(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? parseInt(s,radix): null;
	}
	Long nextLong() throws Exception
	{
		return nextLong(10);
	}
	Long nextLong(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? parseLong(s,radix): null;
	}
	Double nextDouble() throws Exception
	{
		String s = nextString();
		return (s != null)? parseDouble(s): null;
	}
	BigInteger nextBigInteger() throws Exception
	{
		return nextBigInteger(10);
	}
	BigInteger nextBigInteger(int radix) throws Exception
	{
		String s = nextString();
		return (s != null)? new BigInteger(s,radix): null;
	}
}

import java.util.Scanner;

public class MainS {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        long m = in.nextLong();
        long min = 0;
        long max = 0;
        if(n==0){
        	System.out.println("Impossible");
        }else{
        	min = n + n%m;
        	max =(m-1)+ n;
        	System.out.println(min+" "+max);
        }
    }

}

import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        if(m>n){
            System.out.println("Impossible");
            return;
        }
        int min = m;
        int max = m+n-1;
        System.out.println(min+" "+max);
    }
}

import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        if(n==0){
            System.out.println("Impossible");
            return;
        }
        int min = m;
        int max = m+n-1;
        if(m==0) max=min=n;
        System.out.println(min+" "+max);
    }
}

import java.io.*;
public class vnb
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n,m;

int min=0,max=0;

String z[]=br.readLine().split(" ");

n=Integer.parseInt(z[0]);
m=Integer.parseInt(z[1]);

if(m>=n)
{
min=m;
}

else
{
min=n;
}

max=(m+n)-1;

if(n==0)
{
System.out.println("Impossible");
}
else
{
System.out.println(min+" "+max);
}

}
}

import java.util.*;
public class Main
{
    public static void main(String[] args)
    {
        TaskA solver = new TaskA();
        TaskA.solve();
    }
}
class TaskA
{
    public static void solve()
    {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        if(n == 0)
            System.out.println("Impossible");
        else
        {
            int maxSum = 0, minSum = 0;
            System.out.println(Math.max(m,n) + " " + (m+n-1));
        }
    }
}

import java.io.*;
import java.util.*;

public class A
{
	String line;
	StringTokenizer inputParser;
	BufferedReader is;
	FileInputStream fstream;
	DataInputStream in;
	String FInput="";

	void openInput(String file)
	{

		if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
		else
		{
			try{

			fstream = new FileInputStream(file);
			in = new DataInputStream(fstream);
			is = new BufferedReader(new InputStreamReader(in));
			}catch(Exception e)
			{
				System.err.println(e);
			}
		}

	}

	void readNextLine()
	{
		try {
			line = is.readLine();
			inputParser = new StringTokenizer(line, " ");
			//System.err.println("Input: " + line);
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}
		catch (NullPointerException e)
		{
			line=null;

		}

	}

	int NextInt()
	{
		String n = inputParser.nextToken();
		int val = Integer.parseInt(n);

		//System.out.println("I read this number: " + val);
		return val;
	}

	long NextLong()
	{
		String n = inputParser.nextToken();
		long val = Long.parseLong(n);

		//System.out.println("I read this number: " + val);
		return val;
	}

	String NextString()
	{
		String n = inputParser.nextToken();
		return n;
	}

	void closeInput()
	{
		try {
			is.close();
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}

	}

	public static void main(String [] argv)
	{
		String filePath=null;
		if(argv.length>0)filePath=argv[0];
		new A(filePath);
	}

	public void readFInput()
	{
		for(;;)
		{
			try
			{
				readNextLine();
				FInput+=line+" ";
			}
			catch(Exception e)
			{
				break;
			}
		}
		inputParser = new StringTokenizer(FInput, " ");
	}

	public A(String inputFile)
	{
		openInput(inputFile);
		readNextLine();

		int n=NextInt();
		int m=NextInt();
		String ret="Impossible";

		if(n>0)
		{
			ret=(n+((m>n)?m-n:0))+" "+(m+((m>0)?n-1:n));
		}
		else if(m==0)ret="0";

		System.out.println(ret);

        closeInput();
	}

}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
      int n = input.nextInt();
      int m = input.nextInt();
      if(n==0)
      {
          System.out.println("Impossible");
          return;
      }
        System.out.print(((n*(m/n))+m%n)+" ");
        System.out.println(m+(n-1));

    }

}

 import java.util.*;
public class Main {

	public static void main (String [] args){

	 Scanner in = new Scanner (System.in);

	 int n= in.nextInt();
	    int m=in.nextInt();

	    if(n==0)
	   System.out.print("Impossible");

	   else if(m==0)
	   	 System.out.print(n + " " + n);

	   	 else if(n==1)
	   	 System.out.print(m + " " + m);

	    	else if(n==m || n>m)
	     System.out.print(n + " " + (n+ m-1));

	     else if(m>n)
	     System.out.print(m + " " +(n+ m-1));

	}
}

import java.io.PrintWriter;
import java.util.Scanner;

public class A {
    static Scanner in; static int next() throws Exception {return in.nextInt();};
//	static StreamTokenizer in; static int next() throws Exception {in.nextToken(); return (int) in.nval;}
//	static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) throws Exception {
        in = new Scanner(System.in);
//		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
//		in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);

        int n = next(),  k = next();
        if (n == 0) out.println("Impossible");
        else { if (k == 0) out.println("0 0");
            else if (k >= n) {
                out.println(k + " " + (n+k-1));
            } else out.println(n + " " + (k==0?n : (n+k-1)));
        }

        out.println();
        out.close();
    }
}

import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        if(n==0){
            System.out.println("Impossible");
            return;
        }
        int min = m<=n?n:m;
        int max = m+n-1;
        if(m==0) max=min=n;
        System.out.println(min+" "+max);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.Vector;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO Auto-generated method stub
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out=new PrintWriter(System.out);
        //BufferedReader in = new BufferedReader(new FileReader("input.txt"));
        //PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
        String[] input=in.readLine().split(" ");
        int n=Integer.parseInt(input[0]);
        int m=Integer.parseInt(input[1]);
        if(n==0){
            out.println("Impossible");
        }
        if(m==0){
            out.println(n+" "+n);
        }
        else{
            int max=n+m-1;
            int min=Math.max(n, m);
            out.println(min+" "+max);
        }
        out.close();
    }
}

import java.util.Scanner;
public class Javabasics {
    public static void main(String[] args){
        Scanner enter = new Scanner(System.in);
        int n = enter.nextInt(), m = enter.nextInt();
        if(n == 0)
            System.out.println("Impossible");
        else
            System.out.println((n + ((m/n)-1) + m%n) + " " + (n+m-1));
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;

public class Task190A {

	public static void main(String... args) throws NumberFormatException,
			IOException {
		Solution.main(System.in, System.out);
	}

	static class Solution {

		public static void main(InputStream is, OutputStream os)
				throws NumberFormatException, IOException {
			PrintWriter pw = new PrintWriter(os);
			BufferedReader br = new BufferedReader(new InputStreamReader(is));

			String input[] = br.readLine().split(" ");
			int n = Integer.parseInt(input[0]);
			int m = Integer.parseInt(input[1]);

			if (n == 0) {
				pw.println("Impossible");
			} else {
				if (m <= n) {
					pw.println(n + " " + (n + m - 1));
				} else {
					pw.println(m + " " + (n + m - 1));
				}
			}

			br.close();
			pw.flush();
		}
	}

}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforces;

import java.util.Scanner;

/**
 *
 * @author DELL
 */
public class Vasya_and_the_Bus {

    public static void solve() {
        Scanner nera = new Scanner(System.in);

        int n = nera.nextInt();
        int m = nera.nextInt();

        if (n == 0 && m != 0) {
            System.out.println("Impossible");
        } else if (n == 0 && m == 0) {
            System.out.println("0" + " " + "0");
        } else if (n > 0 && m == 0 || (n > 0 && m < n && m > 0)) {
            System.out.println(n + " " + n);
        } else {
            int min = 0, max = 0;
            if (n == m) {
                min = n;
            } else {
                min = n + Math.abs(m - n);
            }
            max = n + m - 1;

            System.out.println(min + " " + max);
        }

    }

    public static void main(String[] args) {

        solve();
    }
}

import java.util.*;
import java.io.*;
import java.lang.*;
public class A190 {
	private static long mod = 1000000007;

	public static void main(String[] args) {
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int n=in.nextInt();
		int m=in.nextInt();
		int max=0,min=0;

		if(n==0 && m!=0) {
			pw.println("Impossible");
		}
		else if(n==0 && m==0) {
			pw.println(0+" "+0);
		}
		else if(n>=m) {
			min=n;
			max=(n+m-1);

			pw.print(min+""+max);
		}
		else if(m>n) {
			min=m;
			max=(n+m-1);

			pw.print(min+" "+max);
		}

		pw.flush();
		pw.close();
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (N == 0)
			System.out.println("Impossible");
		else {
			int min = ((M / N) * N == 0 ? N : (M / N) * N) + M % N;
			int max = (N - 1) + (M == 0 ? 1 : M);
			System.out.println(min + " " + max);
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforces;

import java.util.Scanner;

/**
 *
 * @author DELL
 */
public class Vasya_and_the_Bus {

    public static void solve() {
        Scanner nera = new Scanner(System.in);

        int n = nera.nextInt();
        int m = nera.nextInt();

        if (n == 0 && m != 0) {
            System.out.println("Impossible");
        } else if (n > 0 && m == 0) {
            System.out.println(n + " " + n);
        } else {
            int min = 0, max = 0;
            if (n == m) {
                min = n;
            } else {
                min = n + Math.abs(m - n);
            }
            max = n + m - 1;

            System.out.println(min + " " + max);
        }

    }

    public static void main(String[] args) {

        solve();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Abood2B {

	static int fac (int x) {
		if(x == 0)
			return 1;
		else return x * fac(x - 1);
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();
		int m = sc.nextInt();

		if(n == 0) {
			System.out.println("Impossible");
			return;
		}

		if(m == 0) {
			System.out.println(n + " " + n);
			return;
		}

		System.out.println(n + m - Math.min(n, m) + " " + (n + m - 1));

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.*;
import java.util.*;

public class Main {

   static class Assertion {
      static void check(boolean e) {
         if (!e) {
            throw new Error();
         }
      }
   }

   // class Scanner {
   // StreamTokenizer in;
   //
   // Scanner(InputStream s) {
   // in = new StreamTokenizer(new BufferedReader(new InputStreamReader(s)));
   // in.resetSyntax();
   // in.whitespaceChars(0, 32);
   // in.wordChars(33, 255);
   // }
   //
   // String next() {
   // try {
   // in.nextToken();
   // return in.sval;
   // } catch (Exception e) {
   // throw new Error();
   // }
   // }
   //
   // int nextInt() {
   // return Integer.parseInt(next());
   // }
   //
   // long nextLong() {
   // return Long.parseLong(next());
   // }
   //
   // double nextDobule() {
   // return Double.parseDouble(next());
   // }
   // }

   Scanner in;
   PrintWriter out;

   void solve() {
      int nOld = in.nextInt();
      int nChilds = in.nextInt();
      if (nOld == 0) {
         out.println("Impossible");
      } else {
         int min = 0;
         if (nOld >= nChilds) {
            min += nOld;
         } else {
            min += nOld + (nChilds - nOld);
         }
         int max = nOld + Math.max(0,nChilds - 1);
         out.println(min + " " + max);
      }
   }

   void run() {
      in = new Scanner(System.in);
      out = new PrintWriter(System.out);
      try {
         solve();
      } finally {
         out.close();
      }
   }

   public static void main(String[] args) {
      new Main().run();
   }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	static int []arreglo;
	 public static void main(String []args)throws IOException
	 {
		 BufferedReader sa= new BufferedReader(new InputStreamReader(System.in));
		 PrintWriter res1=new PrintWriter(new OutputStreamWriter(System.out));
		 StringTokenizer res=new StringTokenizer(sa.readLine());

		 int a=Integer.parseInt(res.nextToken());
		 int b=Integer.parseInt(res.nextToken());

		 if(a>1){
			if(a>b){
				if(b==0){
					int aux2=a;
					res1.print(aux2+" "+aux2);
				}
				else
		 {int aux2=a;
		 int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);}

			}
			else{
				int aux2=a+(b-a);
				int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);
			}

		}
		 else
		 {
			 if(a==0)
			 {
				 res1.print("Impossible");
			 }
			 if(a==1)
			 {
				/* if(b==1)
					 {
					   int aux1=1+1;
					   res1.print(aux1+" "+aux1);
					 }
				 else{
					 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);*/
                 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);
			 }

		 }
		 res1.flush();
	 }
	 }

import java.util.Scanner;

public class A_190_Vasya_and_the_Bus {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		int n=input.nextInt(),m=input.nextInt();
		int minimum,maximum;
		if(n<1){
			minimum=0;maximum=0;
		}
		else if(n==1){
			minimum=m;
			maximum=m;
		}
		else{
			if(m==0){
				minimum=n;
				maximum=n;
			}
			else{
				minimum=m;
				maximum=m+n-1;
			}
		}
		if(minimum==0&&maximum==0)
			System.out.println("Impossible");
		else
			System.out.println(minimum+" "+maximum);
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Bus1 {

    public static void main(String[] args) throws Exception {
        int i,j,k;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());
        int M = Integer.parseInt(st.nextToken());

        br.close();

        if (N == 0) {
            System.out.println("Impossible");
            return;
        }

        // vasiot kod ovde

        // minimum
        k = M/N;
        int min = N;

        if (k > 0)
            min += N*(k-1)+(M%N);

        System.out.print(min+" ");

        // maximum
        int max = N;

        if (M > 0)
            max += (M-1);

        System.out.println(max);

    }

}

import java.io.*;
import java.util.*;

public class TaskA implements Runnable {
	BufferedReader in;
	PrintWriter out;
	StringTokenizer stok;

	String nextToken() {
		try {
			while (stok == null || !stok.hasMoreTokens()) {
				stok = new StringTokenizer(in.readLine());
			}
		} catch (Exception e) {
			return null;
		}
		return stok.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	void solve() throws IOException {
		int n = nextInt(), m = nextInt();
		if (n == 0) {
			out.println("Impossible");
		} else {
			out.printf("%d %d", Math.max(n, m), n + Math.max(m, 0) - 1);
		}
	}

	public void run() {
		try {
			try {
				in = new BufferedReader(new FileReader("taska.in"));
				out = new PrintWriter("taska.out");
			} catch (Exception e1) {
				try {
					in = new BufferedReader(new FileReader("input.txt"));
					out = new PrintWriter("output.txt");
				} catch (Exception e2) {
					in = new BufferedReader(new InputStreamReader(System.in));
					out = new PrintWriter(System.out);
				}
			}
			solve();
			in.close();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public static void main(String[] args) throws IOException {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {
		}
		new Thread(new TaskA()).start();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class AVasyaAndTheBus {

    public static void main(String[] args) throws IOException {

        BufferedReader reader= new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer st=new StringTokenizer(reader.readLine());

        int n=Integer.parseInt(st.nextToken());
        int m=Integer.parseInt(st.nextToken());

        if(n==0)
            System.out.println("Impossible");
        else
            if(n==1)
                System.out.println((n+m-1)+" "+(n+m-1));
            else
                if(n>m)
                    System.out.println(n+" "+n);
                else
                    if(n==m)
                    {
                        System.out.println(n+" "+(n+(m-1)));
                    }
        else
            {
                int min=m;
                int max=n+(m-1);
                System.out.println(min+" "+max);
            }

    }

}

import java.util.Scanner;
public class Javabasics {
    public static void main(String[] args){
        Scanner enter = new Scanner(System.in);
        int n = enter.nextInt(), m = enter.nextInt();
        if(n == 0 && m == 0)
            System.out.println(0 + " " + 0);
        else if(n == 0)
            System.out.println("Impossible");
        else if(m == 0)
            System.out.println(n + " " + n);
        else if(m <= n)
            System.out.println(n + " " + (n+m-1));
        else
            System.out.println(n+(m/n-1)+m%n + " " + (n+m-1));
    }
}

//Date: Oct 14, 2013
//Time: 7:36:31 PM

import java.util.*;
import java.io.*;

public class A190 implements Runnable {

	public void solve() throws IOException {
		int N = nextInt();
		int M = nextInt();
		if(N == 0 && M != 0){
			System.out.println("Impossible");
			return;
		}
		if(N == 0 && M ==0){
			System.out.println(0);
			return;
		}
		int max = N +( (M > 0)? M - 1 : 0);
		if(M <= N)
			System.out.println(N + " " + max);
		else{
			System.out.println( (N + ((M / N) - 1) * N + M % N) + " " + max);
		}
	}

	//-----------------------------------------------------------
	public static void main(String[] args) {
		new A190().run();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			tok = null;
			solve();
			in.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BufferedReader in;
	StringTokenizer tok;
}
/**
public class A190 {

}

*/

import java.util.*;
import java.io.*;

public class palin {
	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int a = scan.nextInt();
		int k = scan.nextInt();
		if (a == 0) {
			out.println("Impossible");
			out.flush();
			return;
		}
		if (a >= k) {
			out.println((a) + " " + (a + Math.max(k - 1, 0)));
			out.flush();
			return;
		}
		out.println(k + " " + (k + a - 1));
		out.flush();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String a[] = in.readLine().split(" ");
        int ad = Integer.valueOf(a[0]), ni = Integer.valueOf(a[1]);
        if (ad > 0) {
            System.out.print((ni > ad ? ni : ad) + " ");
            System.out.println(ni > 0 ? ad + ni - 1 : ad);
        } else {
            System.out.println("Impossible");
        }
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.math.BigInteger;
import java.util.StringTokenizer;
public class Bus {

    public static void main(String[] args) throws IOException
    {
        InputStreamReader stream=new InputStreamReader(System.in);
    BufferedReader scan=new BufferedReader(stream);
     String cadena = scan.readLine();
     StringTokenizer tokens = new StringTokenizer(cadena, " ");
     int[] num = new int[tokens.countTokens()];
     for (int i = 0; i < num.length; i++) {
     num[i] = Integer.parseInt(tokens.nextToken());
     }

     int minimo=(num[1]-num[0])+num[0];
     int maximo=minimo+(num[0]-1);

    if(num[0]==0)

    System.out.println("Impossible");

    else
         System.out.println(minimo+" "+maximo);
    }

}

import java.io.*;
import java.util.*;

public class Bus190A {
	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(f.readLine());
		int a = Integer.parseInt(st.nextToken());
		int c = Integer.parseInt(st.nextToken());
		if(a!=0){
			int min = 0;
			int max = 0;
			if(a>=c){
				min=a;
			}
			else{
				min=c;
			}
			max=a+c-1;
			System.out.println(min+" "+max);
		}
		else{
			System.out.println("Impossible");
		}
	}
}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    FastScanner in;
    PrintWriter out;

    static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        String nextLine() throws IOException {
            if (st == null || !st.hasMoreTokens())
                return br.readLine();
            StringBuilder result = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens()) {
                result.append(" ");
                result.append(st.nextToken());
            }
            return result.toString();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

    }

    void run() throws IOException {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out, false);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException{
        new Main().run();
    }

    public void printArr(int[] arr){
        for(int i = 0; i < arr.length; i++){
            out.print(arr[i] + " ");
        }
        out.println();
    }

    public long gcd(long a, long b){
        if(a == 0) return b;
        return gcd(b % a, a);
    }

    public void solve() throws IOException{

        int n = in.nextInt(), m = in.nextInt();

        if(n == 0){
            out.println("Impossible");
        }else{
            int min = n + Math.max(m - n, 0);
            int max = n + m - 1;
            out.println(min + " " + max);
        }

    }

}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforces;

import java.util.Scanner;

/**
 *
 * @author DELL
 */
public class Vasya_and_the_Bus {

    public static void solve() {
        Scanner nera = new Scanner(System.in);

        int n = nera.nextInt();
        int m = nera.nextInt();

        if (n == 0 && m == 0) {
            System.out.println("Impossible");
        } else {
            int min = 0, max = 0;
            if (n == m) {
                min = n;
            } else {
                min = n + Math.abs(m - n);
            }
            max = n + m - 1;

            System.out.println(min+" "+max);
        }

    }

    public static void main(String[] args) {

        solve();
    }
}

/*
 ******************************************************************************
 * MIT License                                                                *
 * Copyright (c) 2020 - Present Viral Lalakia                                 *
 ******************************************************************************
 */

//package com.virallalakia.codeforces;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

/**
 * This is a solution for Vasya and the Bus problem of Codeforces.
 * This is verified on https://codeforces.com. Package definition needs to be removed before submission.
 *
 * @author Viral Lalakia
 */
public class VasyaAndTheBus {

  private static final Scanner SYS_IN =
      new Scanner(new BufferedReader(new InputStreamReader(System.in)));

  /**
   * Main method for solution. Calls to evaluate one or more test cases.
   */
  public static void main(String[] args) {
    evaluateCase();
    SYS_IN.close();
  }

  /**
   * Evaluate a test case. Handles I/O.
   */
  private static void evaluateCase() {
    try {
      int n = SYS_IN.nextInt();
      int m = SYS_IN.nextInt();
      SYS_IN.nextLine();

      if (n == 0) {
        System.out.println("Impossible");
      } else {
        System.out.println(((long)n + m - Math.min(n, m)) + " " + ((long)n + m - Math.min(1, m)));
      }
    } catch (Exception e) {}
  }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int n = in.nextInt(), m = in.nextInt();

            int min = 0, max = 0;
            if (n == 0) {
                out.print("Impossible");
                return;
            } else if (m == 0) {
                min = n;
                max = n;
            } else {
                max = m + n - 1;
                min = n + m - n;
            }

            out.print(min + " " + max);
        }

    }
}

import java.util.Scanner;

public class MainS {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        long m = in.nextLong();
        long min = 0;
        long max = 0;
        if(n==0){
        	System.out.println("Impossible");
        }else{
        	min = m ;
        	max =(m-1)+ n;
        	System.out.println(min+" "+max);

        }

//        }else if(m==n){
//        	min = n + m%n;
//        	max =(m-1)+ n;
//        	System.out.println(min+" "+max);
//        }else if(m>n){
//        	min = n + n%m;
//        	max =(m-1)+ n;
//        	System.out.println(min+" "+max);
//        }else if(n>m){
//        	min = n;
//        	max = n + (m-1);
//        	System.out.println(min+" "+max);
//        }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (N == 0 || (N == 0 && M == 0))
			System.out.println("Impossible");
		else {

			int min = N + Math.max(0, M - N);
			int max = N + Math.max(0, M - 1);
			System.out.println(min + " " + max);

		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
}

import java.util.Scanner;

public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scr = new Scanner(System.in);
		int n = scr.nextInt();
		int m = scr.nextInt();
		if (n == 0) {
			System.out.println("Impossible");
		}
		else {
			int minsum = n;
			if (n < m){
				minsum += (m-n);
			}
			int maxsum = n + ((m > 0)? (m-1):0);
			System.out.println(minsum + " " + maxsum);
		}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class AVasyaAndTheBus {

    public static void main(String[] args) throws IOException {

        BufferedReader reader= new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer st=new StringTokenizer(reader.readLine());

        long n=Long.parseLong(st.nextToken());
        long m=Long.parseLong(st.nextToken());
        if(n==0&&m==0)
            System.out.println("0 0");
        else
        if(n==0)
            System.out.println("Impossible");
        else
            if(n==1)
                System.out.println((n+m-1)+" "+(n+m-1));
            else
                if(n>m)
                    System.out.println(n+" "+(n+m-1));
                else
                    if(n==m)
                    {
                        System.out.println(n+" "+(n+(m-1)));
                    }
        else
            {
                long min=m;
                long max=n+(m-1);
                System.out.println(min+" "+max);
            }

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Soly
{
    static final int INF = Integer.MAX_VALUE;

    static int mergeSort(int[] a,int [] c, int begin, int end)
    {
        int inversion=0;
        if(begin < end)
        {
            inversion=0;
            int mid = (begin + end) >>1;
            inversion+= mergeSort(a,c, begin, mid);
            inversion+=mergeSort(a, c,mid + 1, end);
            inversion+=merge(a,c, begin, mid, end);
        }
        return inversion;
    }
/////////////////////////////////////////////////////

    static int  merge(int[] a,int[]c, int b, int mid, int e)
    {
        int n1 = mid - b + 1;
        int n2 = e - mid;
        int[] L = new int[n1+1], R = new int[n2+1];
        int[] L1 = new int[n1+1], R1 = new int[n2+1];
        //inversion
        int inversion=0;

        for(int i = 0; i < n1; i++) {
            L[i] = a[b + i];
            L1[i] = c[b + i];
        }
        for(int i = 0; i < n2; i++)  {
            R[i] = a[mid + 1 + i];
            R1[i] = c[mid + 1 + i];
        }
        L[n1] = R[n2] = INF;

        for(int k = b, i = 0, j = 0; k <= e; k++)
            if(L[i] <= R[j]){
                a[k] = L[i];
                c[k] = L1[i++];
            }

            else
            {
                a[k] = R[j];
                c[k] = R1[j++];
                inversion=inversion+(n1-i);

            }
        return inversion;

    }
    //////////////////////////////////////////////////////////////
static int l;
 static int va(char[]a){
     Stack<Character>s= new Stack<>();
     int op=0,c=0;
     for (int p = 0; p < a.length; p++) {
         if (a[p]==')'){
             if (!s.isEmpty()){
                 if (s.peek()=='('){
                     op--;
                     s.pop();
                 }
                 else{
                     ++c;
                     s.push(')');
                 }
             }
             else {
                 ++c;
                 s.push(')');
             }
         }
         else if(a[p]=='(') {
             ++op;
             if (!s.isEmpty()){
                 if (s.peek()=='('){
                     s.push(a[p]);
                 }
                 else s.push('(');
             }
             else s.push('(');
         }
     }
     if (s.isEmpty())return 0;
     else {
         if (op>0&&c>0)return 50;
         if (s.peek()=='('){
             //1 opening
             l=s.size();
             return 1;
         }
         else {
             //2 closing
             l=s.size();
             return 2;
         }
     }

 }

/////////////////////////////////////////////////////////////////////////////////
    static public int maxSubArray(int[] nums) {
        boolean s= false,s2=false;
       int ans2=Integer.MIN_VALUE;
        int ans=0,sum=0;
       for (int i = 0; i < nums.length; i++) {
           if (nums[i]>=0)s=true;
           if (nums[i]<0)s2=true;
           ans2=Math.max(ans2,nums[i]);
           if (sum+nums[i]>0)sum+=nums[i];
           else sum=0;
           ans=Math.max(ans,sum);
       }
       if (!s2)return ans;
       if (!s)return ans2;
       else {
           return ans;

       }
   }

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        try (PrintWriter or = new PrintWriter(System.out)) {
        int n=in.nextInt(),m=in.nextInt();
        if (n==0){
            or.println("Impossible");return;
        }
        int max=m+(n-1);
        int min=0;
        if (n>=m)min=n;
        else{
            m-=n;
            min=n+m;
        }
        or.println(min+" "+max);

        }
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

}
class  Triple{
   int r,c,x,y;
    public Triple(int r, int c, int x, int y) {
        this.r = r;
        this.c = c;
        this.x = x;
        this.y = y;
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.TreeSet;

public class myFile
{
	public static void main(String args[])
	{
		int n,ans1,m,ans2;
        Scanner sc = new Scanner(System.in);
	    while(sc.hasNextInt())
	    {
	    	n = sc.nextInt();
	    	m = sc.nextInt();
	    	if(n==0 && m>0)
	    	{
	    		System.out.println("Impossible");
	    		continue;
	    	}
	    	if(n==0 && m==0)
	    	{
	    		System.out.println("0");
	    		continue;
	    	}
	        int z = Math.max(0,m-1);
	    	ans1 = n+z;
	    	m = m-n;
	    	z = Math.max(0,m);
	    	ans2 = n+z;
	    	System.out.println(ans2+" "+ans1);
	    }
	}

}

import java.util.*;

public class cf190a {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt(), b = in.nextInt();
		if(a==0) System.out.println("Impossible");
		else System.out.println(Math.max(a, b) + " " + (a+Math.max(0, b-1)));
	}
}

// created by: 17.04.12 10:13 programmer: thinker

import java.io.BufferedInputStream;
import java.util.Scanner;

public class A
{
    public A()
    {
        Scanner sc = new Scanner(new BufferedInputStream(System.in));
        long n = sc.nextLong(), m = sc.nextLong();
        if(n == 0 && m != 0)
        {
            System.out.println("Impossible");
            return;
        }
        if(m == 0)
            System.out.println((n)+" "+(n));
        else
            System.out.println((n+(m-n))+" "+(n+(m-1)));
    }

    public static void main(String[] args)
    {
        new A();
    }
}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.TreeSet;

import java.math.BigInteger;

public class Main {

	public static boolean debug = false;

	public static Reader in = new Reader();
	public static Writer out = new Writer();

	public static void main(String[] args) {

		long n = in.nextLong();
		long m = in.nextLong();

		if(n==0) {
			out.println("Impossible");
		} else {
			long total = n;

			long tempM = m;

			if(m>=n) {
				tempM -= n;
			} else {
				tempM = 0;
			}

			total += tempM;

			out.print(total+" ");

			total = n;

			total += (m-1);

			out.println(total);

		}
		out.close();
	}

}

class Writer {

	private BufferedWriter output;

	public Writer() {
		output = new BufferedWriter(new OutputStreamWriter(System.out));
	}

	public Writer(String s) {
		try {
			output = new BufferedWriter(new FileWriter(s));
		} catch(Exception ex) { ex.printStackTrace(); System.exit(0);}
	}

	public void println() {
		try {
			output.append("\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void print(Object o) {
		try {
			output.append(o.toString());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void println(Object o) {
		try {
			output.append(o.toString()+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printf(String format, Object... args) {
		try {
			output.append(String.format(format, args));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printfln(String format, Object... args) {
		try {
			output.append(String.format(format, args)+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void flush() {
		try {
			output.flush();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void close() {
		try {
			output.close();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
}

class Reader {
	private BufferedReader input;
	private StringTokenizer line = new StringTokenizer("");

	public Reader() {
		input = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String s) {
		try {
			input = new BufferedReader(new FileReader(s));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void fill() {
		try {
			if(!line.hasMoreTokens()) line = new StringTokenizer(input.readLine());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public double nextDouble() {
		fill();
		return Double.parseDouble(line.nextToken());
	}

	public String nextWord() {
		fill();
		return line.nextToken();
	}

	public int nextInt() {
		fill();
		return Integer.parseInt(line.nextToken());
	}

	public long nextLong() {
		fill();
		return Long.parseLong(line.nextToken());
	}

	public double readDouble() {
		double d = 0;
		try {
			d = Double.parseDouble(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return d;
	}

	public int readInt() {
		int i = 0;
		try {
			i = Integer.parseInt(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return i;
	}

	public int[] readInts(int n) {
		int[] a = new int[n];
		for(int i=0; i<n; i++)
			a[i] = nextInt();
		return a;
	}

	public void fillInts(int[] a) {
		for(int i=0; i<a.length; i++)
			a[i] = nextInt();
	}

	public long readLong() {
		long l = 0;
		try {
			l = Long.parseLong(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return l;
	}

	public String readLine() {
		String s = "";
		try {
			s = input.readLine();
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return s;
	}
}

import java.io.*;
import java.util.*;

public class test
{

	public static void main(String[] args)
	{
		new test().run();
	}

	PrintWriter out = null;

	void run()
	{
		Scanner in = new Scanner(System.in);
		out = new PrintWriter(System.out);

		int n = in.nextInt();
		int m = in.nextInt();

		if (n == 0 && m != 0)
			out.println("Impossible");
		else
		{
			int max = n + m - 1;
			int min = n + m - Math.min(n, m);

			out.println(min + " " + max);
		}

		out.close();
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF190A {
    public static void main(String[] args) {
        FastReader input = new FastReader();
        PrintWriter pw = new PrintWriter(System.out);

        int n = input.nextInt();
        int m = input.nextInt();

        if(n == 0){
            pw.println("Impossible");
        }
        else{
            long ans = 0;
            ans += n;
            if(m > n){
                ans += (m - n);
            }
            long min = ans;

            ans = 0;
            ans += n;
            if(m > 1)
            ans += (m-1);
            long max = ans;

            pw.println(min + " " + max);
        }

        // ****If sorting is required, use ArrayList
        pw.flush();
        pw.close();
    }
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.Scanner;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        if (n == 0 && m != 0)
            System.out.print("Impossible");
        else {
            if (n > m) {
                System.out.print(n + " ");
                System.out.print(n + m - 1);
            } else {
                System.out.print((m / n) * n + m % n + " ");
                System.out.print(n + m - 1);
            }

        }
    }

}

import java.util.Scanner;

public class A {

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0) {
            System.out.println("Impossible");
        } else if (m == 0) {
            System.out.println(n);
        } else {
            int max = m + n - 1;
            int min = n + Math.max(0, m - n);
            System.out.println(min + " " + max);
        }
    }
}

import java.util.Scanner;
public class codeforces190A
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt(),m=s.nextInt(),min=0,max=0;
		if(n==0)
		System.out.print("Impossible");
		else
		{
		    if(m<=n)
		    {
		        min=n;
		        if(m==0)
		        max=n;
		        else
		        max=n+m-1;
		    }
		    else
		    {
		        max=n+m-1;
		        min=m;
		    }
		    System.out.print(min+" "+max);
		}
    }
}

import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import static java.lang.System.*;
import java.math.BigInteger;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;

public class busandfare {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static Scanner sc = new Scanner(System.in);

    public static String getString() {
        try {
            return br.readLine();
        } catch (Exception e) {
        }
        return "";
    }

    public static Integer getInt() {
        try {
            return Integer.parseInt(br.readLine());
        } catch (Exception e) {
        }
        return 0;
    }

    public static Integer[] getIntArr() {
        try {
            String temp[] = br.readLine().split(" ");
            Integer temp2[] = new Integer[temp.length];
            for (int i = 0; i < temp.length; i++) {
                temp2[i] = Integer.parseInt(temp[i]);
            }
            return temp2;
        } catch (Exception e) {
        }
        return null;
    }

    public static int getMax(Integer[] ar) {
        int t = ar[0];
        for (int i = 0; i < ar.length; i++) {
            if (ar[i] > t) {
                t = ar[i];
            }
        }
        return t;
    }

    public static void printList(List<Integer> a) {
        System.out.println(a.toString().replace("[", "").replace("]", "").replace(",", ""));
    }

    public static void print(Object a) {
        out.println(a);
    }

    public static int nextInt() {
        return sc.nextInt();
    }

    public static double nextDouble() {
        return sc.nextDouble();
    }

    public static BigInteger getFact(long in) {
        BigInteger ot = new BigInteger("1");
        for (Integer i = 1; i <= in; i++) {
            ot = ot.multiply(new BigInteger(i.toString()));
        }
        return ot;
    }

    public static String gbase(int a, int base) {
        String out = "";
        int temp = a;
        while (temp > 0) {
            out = temp % base + out;
            temp /= base;
        }
        return out;
    }

    public static void main(String[] ar) {
        Integer[] inp = getIntArr();
        int min = 0;
        int max = 0;

        if (inp[1] > inp[0]) {
            print("Impossible");
            return;
        }

        if (inp[1] >= inp[0]) {
            min += inp[1] - inp[0];
            min += inp[0] ;
        } else {
            min += inp[0];
        }
        if (inp[1] > 0) {
            max += inp[1];
            max += inp[0] - 1;
        }

        if(inp[1]==0){
            max=inp[0];
            min=max;
        }
        print(min + " " + max);
    }
}

import java.util.*;

public class a {

	public static void main(String args[]){
		Scanner in=new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		if (n == 0)
			System.out.println(n +" " + n);
		if (m == 0)
			System.out.println ("Impossible");
		else {
			System.out.println(Math.min(m + (n - m > 0 ? n - m : 0), n - 1 + m) + " " + Math.max(m + (n - m > 0 ? n - m : 0), n - 1 + m));
		}

	}

}

import java.util.Scanner;

public class VasyaandTheBus {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int m = input.nextInt();
		if(n!=0){
			System.out.print(n+Math.max(0,m-n) + " " + (m+n-1));
		}
		else{
			System.out.println("Impossible");
		}
	}

}

import java.util.Scanner;

public class A190 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        if (n == 0) {
            System.out.println("IMPOSSIBLE");
            return;
        }

        int min = n + Math.max(m - n, 0);
        int max = n +  Math.max(m - 1, 0);
        System.out.println(min + " " + max);

    }

}

import java.util.Scanner;

public class P_190_A_VasyaAndTheBus {

    public static void main(String[] args) {

        Scanner x = new Scanner(System.in);
        int n = x.nextInt();
        int m = x.nextInt();
        if (n == 0) {
            System.out.println("Impossible");
            return;
        }
        int min=m;
        int max=n+m-1;
        System.out.println(min+" "+max);
    }

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Arrays;

public class VasyaAndTheBus{
    public static void main(String [] args) throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tok = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tok.nextToken());
        int b = Integer.parseInt(tok.nextToken());

        if(a == 0&& b !=0) System.out.println("Impossible");
        else if(a ==0 && b ==0) System.out.println("0 0");
        else{
            int maks = a + b -1;
            if(b <= a) b = 0;
            else{
                b = b-a;
            }
            int min = a+b;
            System.out.println(min +" "+maks);
        }
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class Bus {

    public static void main(String[] args) throws IOException
    {
        InputStreamReader stream=new InputStreamReader(System.in);
    BufferedReader scan=new BufferedReader(stream);
     String cadena = scan.readLine();
     StringTokenizer tokens = new StringTokenizer(cadena, " ");
     int[] num = new int[tokens.countTokens()];
     for (int i = 0; i < num.length; i++) {
     num[i] = Integer.parseInt(tokens.nextToken());
     }
     int minimo=(num[1]-num[0])+num[0];
     int maximo=minimo+(num[0]-1);
    if(num[0]!=0)

     System.out.println(minimo+" "+maximo);

    else
        System.out.println("Impossible");
    }

}

import java.util.*;
import java.util.Scanner;

import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;

import java.math.BigDecimal;
import java.math.BigInteger;

import java.util.ArrayList;
import java.util.Vector;
import javax.management.StringValueExp;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Scanner sc;
        sc = new Scanner(inputStream);
        Task solver = new Task();
        solver.solve(sc, out);
        out.close();
    }
}

class Task {
    public void solve(Scanner in, PrintWriter out) {
            int n = in.nextInt(), m = in.nextInt();
            if (n == 0) {
                if (m != 0)
                out.println("Impossible");
                return;
            }
            else
                out.println(n + Math.max(m - n, 0) + " " + Math.max(n, (n-1 + m)) );
        }

}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }
    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt() {
        return Integer.parseInt(next());
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	static int []arreglo;
	 public static void main(String []args)throws IOException
	 {
		 BufferedReader sa= new BufferedReader(new InputStreamReader(System.in));
		 PrintWriter res1=new PrintWriter(new OutputStreamWriter(System.out));
		 StringTokenizer res=new StringTokenizer(sa.readLine());

		 int a=Integer.parseInt(res.nextToken());
		 int b=Integer.parseInt(res.nextToken());

		 if(a>1){
			if(a>b){
				if(b==0){
					int aux2=a;
					res1.print(aux2+" "+aux2);
				}
				else
		 {int aux2=a;
		 int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);}

			}
			else{
				int aux2=a+(b-a);
				int aux4=(a-1)+(1+(b-1));

				 res1.print(aux2+" "+aux4);
			}

		}
		 else
		 {
			 if(a==0)
			 {
				 res1.print("Impossible");
			 }
			 if(a==1)
			 {
				/* if(b==1)
					 {
					   int aux1=1+1;
					   res1.print(aux1+" "+aux1);
					 }
				 else{
					 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);*/
                 int aux1=1+(b-1);

				 res1.print(aux1+" "+aux1);
			 }

		 }
		 res1.flush();
	 }
	 }

import java.util.*;
 public class A{
     public static void main(String []args){
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = sc.nextInt();
         if(n == 0){
             System.out.println("Impossible");

         }else{
             int k = m - n;
             if(m == 0)
                m = 1;
             if(k < 0) k = 0;
                System.out.println((n+k) + " " + (n + m - 1));
         }
     }
 }