package b; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double x = sc.nextDouble(); double y = sc.nextDouble(); double amin = Math.max(x+y-1,0); double amax = Math.min(x,y); System.out.println((x-amin) + " " + (x-amax)); } }