Ignas has three kinds of building blocks. Blocks of each kind have a different color and a different height. Luckily for Ignas, he has an unlimited supply of each kind.
Ignas wants to use these blocks to build a tower exactly N centimeters tall. However, he wants the tower to be a single color, so he may use blocks of only one kind.
It may be impossible to build a tower of exactly N centimeters from a single kind of block. For example, if a block is 3 cm tall, he can build towers of 3 cm, 6 cm, or 9 cm, but not towers of 7 cm or 10 cm.
Ignas wants to choose the kind of block that lets him build a tower whose height is as close to N as possible. The tower must contain at least one block (a tower of height 0 is not allowed). Help Ignas pick the most suitable blocks.
The first line contains the desired tower height N (in centimeters). The second line contains three distinct integers a, b, and c: the heights (in centimeters) of the three kinds of blocks.
Print two integers: the height of the block Ignas should choose, and the height of the tower (closest to N) that he can build from it.