117 人解决，154 已尝试。
139 份提交通过，共有 708 份提交。
6.8 EMB 奖励。
单测试点时限: 3.0 秒
内存限制: 512 MB
EOJ has recently opened a new live channel, so that coders can broadcast their coding online and chat with the audience at the same time. It has become children’s favorite entertainment at night, well, other than the monthly contest.
It may sound hard to believe, but the EOJ team has recently encountered some trouble in terms of the live channel statistics. Basically they want to know two things:
The first line contains two space-separated integers and (, ), denoting the number of children log-in record, the length of the show.
The next line each contains two space-separated integers and (), meaning that a child starts to watch the channel at the start of second , and leave the channel at the end of second . Notice that the same pair of might appear multiple times, they are believed to be different records.
You can safely assume that these records all belong to different children.
In the first line, output the maximum number. You can write it as an integer, or a floating number, as you like.
In the second line, output the average number as a floating number.
The absolute or relative error should be not greater than .
2 10 1 5 5 10
4 10 1 3 4 4 8 8 5 7
5 10 5 6 4 7 3 8 2 9 1 10