Problems
431 - Birds & Rabbits
SUBMIT PROBLEM

Birds & Rabbits

Time Limit: 1 sec

 

The Problem

A Cage Contains birds & rabbits.There are M Heads and N feets.

Make a simple program that find how many birds and rabbits are there in the cage.

 

The Input

Input file contain a series of line, each line contain two integer numbers M, and N(0<M, N<1000) denoted the number of heads and number of feets. Input is terminated by EOF.

 

The Output

For each line of input, print number of birds and number of rabbits seperated by space in a separate line.

 

Sample Input

3 10

16 38

 

Sample Output

1 2

13 3

 

 

 

 

Problem Setter: Tamzid Mahmud