P11815 [AOJ] Proportional Representation
普及
题目描述

Example

Input

10 2
2
1

Output

5 7
3 5

输入格式

见题面

输出格式

见题面

样例输入
10 2 2 1
样例输出
5 7 3 5