The mayor decided to install a new TV transmission system. The city is a segment of length D, and N buildings stand on it. A building is narrow enough that its width can be ignored, so building i is a segment that rises from one point of the ground up to height Hi. Some buildings carry a TV transmitter on the roof, and the size of a transmitter is ignored as well.
A transmitter sends its signal in every direction. The signal travels along a straight line and cannot pass through a building. Some points of the ground receive a signal and others do not. A point p receives a signal when the segment joining p to one of the transmitters is blocked by no building.

Write a program that adds up the length of every part of the ground that receives a signal. The receiving part can be split into several pieces.
The first line contains the number of buildings N (1≤N≤3×105) and the length of the city D (1≤D≤109).
Each of the next N lines describes one building with three integers.
The buildings come in increasing order of their distance from the left end. No two buildings stand at the same position.
Print the total length of the receiving part on one line as an irreducible fraction p/q. That is, take the two integers with q≥1 and gcd(p,q)=1, and write them in the form p/q. The answer is always rational, so print the exact fraction instead of rounding. Keep the denominator even when the total length is an integer. Print 6/1 for a length of 6, and 0/1 for a length of 0.