---
# System prepended metadata

title: Untitled

---

The government has installed **N** CCTV cameras in a city for surveillance. The government wants to know which areas are currently under surveillance so that they can install CCTV cameras that are not under surveillance. There is a lot of data that need to be examined. The data might show some areas overlap with other areas because some CCTV cameras cover common areas.

The government wants you to provide them with a summarized list of areas that are currently under surveillance by combining the common areas.

For example, if the data is `[[1, 3], [3, 5], [10, 15]]`, we can combine `[1, 3]`, `[3, 5]` and provide a summarized list as `[[1, 5], [10, 15]]`.

Write a program that reads the number of CCTV cameras **N**, start points and end points of CCTV cameras, and prints the summarized list of areas under surveillance in ascending order by combining the common areas.


The start point of a CCTV camera is always less than or equal to its end point.

---

#### Input

The first line contains a single integer `N` representing the number of CCTV cameras.
Next `N` lines contain two space-separated integers in each line representing the start point and end point of a single CCTV camera.

---

#### Output
The output should be two lines, 

- The first line contains a summarized list of areas under surveillance in ascending order

- The second line highlights the areas that are covered by more than one camera.


---

#### Explanation

For example, if the given number of CCTV cameras `N = 5`, read the next `N` lines,

- The list of start points and end points is `[[2, 4], [16, 19], [3, 7], [17, 21], [25, 30]]`
- The areas `[2, 4]` and `[3, 7]` are covered by two different CCTV cameras. Here, we can combine and say that area `[2, 7]` is under surveillance.
- Similarly, we can combine `[16, 19]` and `[17, 21]` and simply say as the area `[16, 21]` is under surveillance.
- So, the summarized list in ascending order is `[[2, 7], [16, 21], [25, 30]]`
- The areas with overlapping surveillance are ``[[3, 4], [17, 19]]``.


The output should be 

`[[2, 7], [16, 21], [25, 30]]`
`[[3, 4], [17, 19]]`
