import java.util.Scanner; public class Main_yukicoder3001 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double x = sc.nextDouble(); double y = sc.nextDouble(); System.out.printf("%.10f %.10f\n", Math.max(0.0, x - y), Math.min(x, 1.0 - y)); sc.close(); } }