with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Solve is
   N : Integer;
   A : Integer;
   B : Integer;
   Max : Integer;
   Min : Integer;
begin
   Get (N);
   Get (A);
   Get (B);
   Max := A;
   if B < A then
      Max := B;
   end if;
   if A+B <= N then
      Min := 0;
   else
      Min := A+B-N;
   end if;
   Put (Integer'Image (Max));
   Put (Integer'Image (Min));
end Solve;