Problem E: 再来硬币

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:95 Solved:55

Description

有n(1<=n<=100)种硬币,面值(非负整数)分别为V 1 , V 2 , …, V n(1<=Vi<=S) ,每种都有无限多。给定非负整数S(0<=S<=10000),可以选用多少个硬币,使得面值之和恰好为S?输出硬币数目的最小值和最大值。

Input

S,硬币种类数,硬币面值

Output

最大值
最小值

Sample Input Copy

11
3
1 3 5

Sample Output Copy

11
3