logo AlgoBeat OnlineJudge
登录 注册

#213739. [NWRRC 2021] Boris and Berta

内存限制:512 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Boris is making a quest for his sister Berta. One of the tasks is to find a point on the map that is meters to the north from their house. But it's too easy if is specified directly. Boris decided to use miles and cables to specify the distance.

He found out that there are a lot of different miles: from a -meter Chinese mile (called ) up to a -meter Norwegian mile (called ). And a cable length can be anywhere from to meters.

Boris decided to use an -meter mile and a -meter cable. Now he wants to represent the -meter distance as " miles and cables" with non-negative integers and as precisely as possible --- that is, he wants to minimize . Help him!

输入格式

Three lines contain an integer each: --- the distance to represent, --- the chosen length of a mile, and --- the chosen length of a cable (; ; ). All values are given in meters.

输出格式

Print two non-negative integers and --- the best approximation for the distance of meters using the chosen mile and cable lengths. If there are multiple best approximations, print any of them.

样例

样例输入 1

1234
500
169

样例输出 1

0 7

样例输入 2

1700
500
200

样例输出 2

1 6

数据范围与提示

There are two correct answers to the second example test: and .