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(Math.max(0,x-1),Math.max(y-1,x+y-1)); double amax = Math.min(Math.min(1,x),Math.min(y, x+y)); System.out.print((x-amin) + " " + (x-amax)); } }