#T330. 区间合并
区间合并
Here's the translation of the provided Chinese text into English while preserving all formatting:
## Description
Given $n$ closed intervals \[$a\_i; b\_i$\], where $i=1,2,...,n$. Any two adjacent or overlapping closed intervals can be merged into a single closed interval. For example, \[$1;2$\] and \[$2;3$\] can be merged into \[$1;3$\], \[$1;3$\] and \[$2;4$\] can be merged into \[$1;4$\], but \[$1;2$\] and \[$3;4$\] cannot be merged. Our task is to determine whether these intervals can eventually be merged into a single closed interval. If possible, output this merged interval; otherwise, output `no`.
## Input Format
The first line contains an integer $n$, $3 ≤ n ≤ 50000$, representing the number of intervals.
The next $n$ lines each contain two integers $a\_i$ and $b\_i$, separated by a single space, representing the interval \[$a\_i; b\_i$\] (where $1 ≤ a\_i ≤ b\_i ≤ 10000$).
## Output Format
Output a single line. If the intervals can be merged into a single closed interval, output the left and right boundaries of this interval, separated by a single space; otherwise, output `no`.
The translation maintains all the original structure, including the mathematical notation, code blocks, and formatting. Let me know if you need any adjustments!
5
5 6
1 5
10 10
6 9
8 10
1 10