Problem3083--B. 车库

3083: B. 车库

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

红太阳农场的车库里,停了很多自行车和三轮车,众所周知,一辆自行车有 lns="http://www.w3.org/1998/Math/MathML">2 个轮子,一辆三轮车有 lns="http://www.w3.org/1998/Math/MathML">3 个轮子。

车库管理员张师傅数了数,车库一共有 lns="http://www.w3.org/1998/Math/MathML">N 个轮子。请编程计算出,车库中,可能有多少辆自行车,多少辆三轮车?

Input

读入一个整数 N ,代表车库中车轮的总数;

Output

请按照自行车从少到多的顺序,输出自行车和三轮车可能的数量,每行输出一组可能的答案;

每行用空格隔开 lns="http://www.w3.org/1998/Math/MathML">2 个整数,第 lns="http://www.w3.org/1998/Math/MathML">1 个整数代表自行车可能的数量,第 lns="http://www.w3.org/1998/Math/MathML">2 个整数代表三轮车可能的数量;

Sample Input Copy

16

Sample Output Copy

2 4
5 2
8 0

HINT

样例输入2:
21
样例输出2:
0 7
3 5
6 3
9 1

样例 lns="http://www.w3.org/1998/Math/MathML">1 分析

车库共有 lns="http://www.w3.org/1998/Math/MathML">16 个轮子,那么如果有 lns="http://www.w3.org/1998/Math/MathML">2 辆自行车, lns="http://www.w3.org/1998/Math/MathML">4 辆三轮车,总轮子数量lns="http://www.w3.org/1998/Math/MathML">=2 \times 2 + 4 \times 3=16,符合题意,同理 lns="http://www.w3.org/1998/Math/MathML">5 辆自行车、 lns="http://www.w3.org/1998/Math/MathML">2 辆三轮车 或者 lns="http://www.w3.org/1998/Math/MathML">8 辆自行车、 lns="http://www.w3.org/1998/Math/MathML">0 辆三轮车,也都能计算出共有 lns="http://www.w3.org/1998/Math/MathML">16 个轮子;

数据范围

对于 lns="http://www.w3.org/1998/Math/MathML">100\% 的数据,lns="http://www.w3.org/1998/Math/MathML">2 \le N \le 1000

Source/Category