#P329. 练55.4 沙堡

练55.4 沙堡

Description

John built a castle out of sand. Like all castle walls, this wall has many gun ports, and the sections between two adjacent gun ports are called "battlements." The wall has a total of NN (1<N250001 < N ≤ 25000) battlements, each with a height of MiM_i (1Mi1051≤M_i≤10^5).
Now, John wants to adjust the height of the battlements to a certain order of BiB_i (1Bi1051≤B_i≤10^5). For each unit increase in height, John needs XX (1X1001≤X≤100) dollars; for each unit decrease, he needs YY (1Y1001≤Y≤100) dollars. The question is: what is the minimum amount of money John needs to achieve his goal?

Input Format

The first line contains three integers NN, XX, and YY.
The next NN lines each contain two integers MiM_i and BiB_i.

Output Format

A single integer representing the minimum cost.

Sample

3 6 5
3 1
1 2
1 2
11