Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EI2122Q1DSAF2 - Employees Working Hours

Given the list of check-in and check-out time of employees. Output the number of working hours of them.

Input

-      The first line contains a number of check-in, check-out records (1 £ N £ 105).

-      Each line in the next N lines contains two integers representing a record. First integer is the id of employee. The second integer is the time of check-in/check-out

Output

The list of employees in ascending order of id. For each employee, output the id and the number of working hours.

Sample

Input

Output

6

1 4

2 4

1 5

1 6

2 8

1 11

1 6

2 4

 


Added by:Ha Minh Ngoc
Date:2021-12-20
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.