Nikanor Loves Games

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Nikanor spends all his free time on games. Because of this, he gets bad marks at the university, but that's another story. He also likes gambling. In this problem, we consider the modification of the game called "Orlyanka". There are two players, and each of them has his own coin. Each of the two sides of a coin contains an integer. Players toss their coins, and the winner is the one with the highest number. We can assume that for each coin the probabilities of coming up both sides are equal.

Tonight Nikanor is playing this game with his friends. Nikanor has nn friends, and he will play with each of them for a bet of x_ix\_i rubles. Fortunately, Nikanor knows that his ii-th friend has a coin with the numbers a_ia\_i and b_ib\_i. If Nikanor wins against his friend, he will receive x_ix\_i rubles. Otherwise, he will pay x_ix\_i rubles to his friend. If Nikanor and his friend dropped the same value, Nikanor is declared the winner. 

Now Nikanor is going to go to the store and buy one coin for all games to maximize his expected profit, taking the coin cost into account. In this shop, a coin with the numbers aa and bb costs aba \cdot b rubles. Nikanor can buy any coin with positive integers. 

It's so hard for Nikanor to make the right decision... Nikanor asks you to help him choose a coin so that the expected profit is as high as possible.

입력

The first line contains one integer nn (1n21051 \le n \le 2 \cdot 10^5) denoting the number of friends.

Each of the following nn lines contains three integers a_ia\_i, b_ib\_i, and x_ix\_i (1a_i,b_i,x_i1091 \le a\_i, b\_i, x\_i \le 10^{9}) representing the numbers on ii-th friend's coin and ii-th bet in rubles.

출력

Print a single integer --- the maximum expected profit.

Your answer will be considered correct if its absolute or relative error does not exceed 10610^{-6}.

Formally, let your answer be aa, and the jury's answer be bb. Your answer will be accepted if and only if abmax(1,b)106\frac{|a-b|}{\max(1,|b|)} \le 10^{-6}.