No!

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

문제

Given are nn walls, the ii-th wall has height h_ih\_i and strength s_is\_i. You need to arrange them in a line from left to right.

For the next qq days, the wind will blow every night. Due to the inaccuracy of the weather forecast, you cannot be sure of the strength of the wind blowing each night.

On the morning of the kk-th day, the security center will build an infinitely strong wall of height h_kh'\_k on the far left side of the ground. You can then arrange the nn walls you have in any order to the right of this wall. Note that the wall built by the security center each day is only available for that day. The original one will be removed before a new wall is built the next day.

In the evening, the wind with strength vv will blow from the far left. For each ii, the ii-th wall from the left will receive the impact of Δ_i=vmax(0,h_imax_0j<ih_j)\Delta\_i = v \cdot \max(0, h\_i - \max\_{0 \le j < i} h\_j). Here, wall 00 is the wall that the security center built: its height on the kk-th day is h_kh'\_k, and its strength is infinite. If Δ_i>s_i\Delta\_i > s\_i for some ii, then the ii-th wall will collapse and you will suffer a heavy economic loss.

You want to know, for each day, the maximum strength of the wind you can sustain without suffering economic losses if you arrange your nn walls optimally.

It can be shown that the answer is either infinite or can be expressed in the form r=a/br = a/b, where aa and bb are coprime positive integers. You only need to output the values of aa and bb.

입력

The first line of the input consists two integers nn and qq (1n,q51051 \le n,q \le 5 \cdot 10^5).

Each of the next nn lines contains two integers h_ih\_i and s_is\_i (1h_i41061 \le h\_i \le 4 \cdot 10^6, 1s_i1091 \le s\_i \le 10^9), indicating the height and strength of the ii-th wall.

Each of the next qq lines contains an integer h_kh'\_k (1h_k41061 \le h'\_k \le 4 \cdot 10^6), indicating the height of the infinitely strong wall that the security center built on the kk-th day.

출력

Output qq lines, each in the format of an irreducible fraction "aa/bb", with no spaces and a slash in between, indicating that the answer has the value r=a/br=a/b. If the walls can withstand wind of any strength, print the infinite answer as "1/0".