시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 113 28 20 25.974%

## 문제

Two friends Albert and Barney came to the newly opened restaurant “Burrito King”. The restaurant had opened just yesterday, and Albert has got a special gift card, which allows the friends to get a free burrito. However, there is a constraint on the amount of ingredients — the burrito can contain at most gi grams of ingredient $i$ for all $i$ from 1 to $n$.

There are two satisfaction parameters $a_i$ and $b_i$ for each ingredient — the amount of Albert’s joy per gram of the corresponding ingredient, and the amount of Barney’s unhappiness per gram, correspondingly.

Therefore, the total Albert’s joy from the burrito is equal to:

$\sum_{i=1}^{n}{s_i \cdot a_i}$

The total Barney’s unhappiness from the burrito is equal to:

$\sum_{i=1}^{n}{s_i \cdot b_i}$

Here $s_i$ is the number of grams of the $i$-th ingredient in the burrito. Note, that $s_i$ is not necessarily an integer, and 0 ≤ $s_i$ ≤ $g_i$.

Albert wants to make his total joy from the burrito to be at least $A$. Barney is his best friend, so Albert wants Barney’s total unhappiness to be no more than $B$. Among all possible burritos that satisfy the above constrains, Albert wants to choose one that maximises his total joy.

Your task is to help Albert to choose $s_i$ to satisfy these conditions or to find out that there is no solution.

## 입력

The first line contains three integers $n$, $A$, and $B$ (1 ≤ $n$ ≤ 100 000, 0 ≤ $A$, $B$ ≤ 109), the number of ingredients, the least amount of Albert’s joy and the maximal amount of Barney’s unhappiness. Each of the following $n$ lines contains a description of an ingredient: three integers $g_i$, $a_i$, $b_i$ (0 ≤ $g_i$, $a_i$, $b_i$ ≤ 100) — the maximal number of grams allowed, the amount of Albert’s joy per gram and the amount of Barney’s unhappiness per gram.

## 출력

The first line of the output must contain two real numbers — the maximal amount of his joy and the amount of Barney’s unhappiness that Albert can obtain, satisfying the conditions in the problem statement, or “−1 −1”, if Albert cannot satisfy the conditions.

If the conditions are satisfiable the second line must contain $n$ real numbers — the amount of each ingredient in grams.

Your output must have an absolute or relative error of at most 10−8.

Any way to reach maximal Albert’s joy that satisfies the given conditions can be printed.

## 예제 입력 1

2 5 5
2 2 1
2 2 4


## 예제 출력 1

5.5 5
2 0.75


## 예제 입력 2

2 5 5
2 2 2
2 2 4


## 예제 출력 2

-1 -1