14691 - Cowboys and Horses II   

Description

In a ranch, there are horses and cowboys, since every creature in the ranch are normal, a horse would have 4 legs and 1 head, a cowboy would have 2 legs and 1 head.

Now, given the total number of heads and legs in the ranch, try to calculate how many horses and cowboys are in the ranch.

Input

The number of heads n and the number of legs m.

2 ≤ n,m ≤ 1000

Output

Output 2 intergers in one line, the first being the number of cowboys, the other being the number of horses.

Sample Input  Download

Sample Output  Download

Tags




Discuss